Update chatbot/plugins/chat.py
Browse files- chatbot/plugins/chat.py +6 -3
chatbot/plugins/chat.py
CHANGED
@@ -381,7 +381,7 @@ async def auto_post_channel(client, callback):
|
|
381 |
file_id = data.get("file_id", None)
|
382 |
if data.get("is_channel_photo", False):
|
383 |
if not file_id:
|
384 |
-
return await callback.answer("Can't found file_id", True)
|
385 |
who_post = data.get("channel_id", None)
|
386 |
if not who_post:
|
387 |
return await callback.answer("@GeminiAIDev_bot add to your channel as admin!", True)
|
@@ -397,6 +397,10 @@ async def auto_post_channel(client, callback):
|
|
397 |
chat=data.get("channel_username", "RendyProjects"),
|
398 |
is_menu=data.get("is_channel_photo", False)
|
399 |
)
|
|
|
|
|
|
|
|
|
400 |
await callback.edit_message_reply_markup(reply_markup=keyboard)
|
401 |
return
|
402 |
|
@@ -756,7 +760,7 @@ async def response_call(client, callback):
|
|
756 |
InlineKeyboardButton(f"๐", url=f"https://t.me/{chat}"),
|
757 |
InlineKeyboardButton(f"๐๏ธ", callback_data=f"menutools_{int(user_id)}"),
|
758 |
InlineKeyboardButton(f"โพ๏ธ", callback_data=f"trmulti_{int(user_id)}"),
|
759 |
-
InlineKeyboardButton(f"๐พ", callback_data=f"memory_{int(user_id)}")
|
760 |
],
|
761 |
[
|
762 |
[
|
@@ -767,7 +771,6 @@ async def response_call(client, callback):
|
|
767 |
]
|
768 |
)
|
769 |
await callback.edit_message_reply_markup(reply_markup=keyboard)
|
770 |
-
return
|
771 |
|
772 |
def create_keyboard(
|
773 |
likes: int = 0,
|
|
|
381 |
file_id = data.get("file_id", None)
|
382 |
if data.get("is_channel_photo", False):
|
383 |
if not file_id:
|
384 |
+
return await callback.answer("Can't found file_id or expired", True)
|
385 |
who_post = data.get("channel_id", None)
|
386 |
if not who_post:
|
387 |
return await callback.answer("@GeminiAIDev_bot add to your channel as admin!", True)
|
|
|
397 |
chat=data.get("channel_username", "RendyProjects"),
|
398 |
is_menu=data.get("is_channel_photo", False)
|
399 |
)
|
400 |
+
await db.backup_chatbot.update_one(
|
401 |
+
{"user_id": user_id},
|
402 |
+
{"$unset": {"file_id": None}}
|
403 |
+
)
|
404 |
await callback.edit_message_reply_markup(reply_markup=keyboard)
|
405 |
return
|
406 |
|
|
|
760 |
InlineKeyboardButton(f"๐", url=f"https://t.me/{chat}"),
|
761 |
InlineKeyboardButton(f"๐๏ธ", callback_data=f"menutools_{int(user_id)}"),
|
762 |
InlineKeyboardButton(f"โพ๏ธ", callback_data=f"trmulti_{int(user_id)}"),
|
763 |
+
InlineKeyboardButton(f"๐พ", callback_data=f"memory_{int(user_id)}")
|
764 |
],
|
765 |
[
|
766 |
[
|
|
|
771 |
]
|
772 |
)
|
773 |
await callback.edit_message_reply_markup(reply_markup=keyboard)
|
|
|
774 |
|
775 |
def create_keyboard(
|
776 |
likes: int = 0,
|