akn/manage/builderclone_bots.py
CHANGED
@@ -104,7 +104,7 @@ async def new_alldlbot_clone(bot: Client, cb: CallbackQuery):
|
|
104 |
"uuid": bot_uuid,
|
105 |
"user_id": user_id,
|
106 |
"bot_token": bot_token,
|
107 |
-
"bot_id": replace_bot_id,
|
108 |
"status": "pending",
|
109 |
"is_active": False,
|
110 |
"timestamp": current_time
|
@@ -114,14 +114,14 @@ async def new_alldlbot_clone(bot: Client, cb: CallbackQuery):
|
|
114 |
await db_client.alldl_bot.update_one(
|
115 |
{"user_id": user_id},
|
116 |
{"$push": {"bots": bot_data},
|
117 |
-
"$set": {"last_updated": current_time, "bot_id": replace_bot_id}},
|
118 |
upsert=True
|
119 |
)
|
120 |
approved_count = sum(1 for bot in existing_request.get("bots", []) if bot.get("status") == "approved")
|
121 |
else:
|
122 |
await db_client.alldl_bot.insert_one({
|
123 |
"user_id": user_id,
|
124 |
-
"bot_id": replace_bot_id,
|
125 |
"username": cb.from_user.username,
|
126 |
"bots": [bot_data],
|
127 |
"deployed_bots": 0,
|
|
|
104 |
"uuid": bot_uuid,
|
105 |
"user_id": user_id,
|
106 |
"bot_token": bot_token,
|
107 |
+
"bot_id": int(replace_bot_id),
|
108 |
"status": "pending",
|
109 |
"is_active": False,
|
110 |
"timestamp": current_time
|
|
|
114 |
await db_client.alldl_bot.update_one(
|
115 |
{"user_id": user_id},
|
116 |
{"$push": {"bots": bot_data},
|
117 |
+
"$set": {"last_updated": current_time, "bot_id": int(replace_bot_id)}},
|
118 |
upsert=True
|
119 |
)
|
120 |
approved_count = sum(1 for bot in existing_request.get("bots", []) if bot.get("status") == "approved")
|
121 |
else:
|
122 |
await db_client.alldl_bot.insert_one({
|
123 |
"user_id": user_id,
|
124 |
+
"bot_id": int(replace_bot_id),
|
125 |
"username": cb.from_user.username,
|
126 |
"bots": [bot_data],
|
127 |
"deployed_bots": 0,
|