Update chatbot/plugins/chat.py
Browse files- chatbot/plugins/chat.py +7 -4
chatbot/plugins/chat.py
CHANGED
@@ -377,14 +377,17 @@ async def auto_post_channel(client, callback):
|
|
377 |
backup_chat = await db._get_chatbot_chat_from_db(user_id)
|
378 |
data = await db.backup_chatbot.find_one({"user_id": user_id})
|
379 |
if not data:
|
380 |
-
|
|
|
381 |
file_id = data.get("file_id", None)
|
382 |
if data.get("is_channel_photo", False):
|
383 |
if not file_id:
|
384 |
-
|
|
|
385 |
who_post = data.get("channel_id", None)
|
386 |
if not who_post:
|
387 |
-
|
|
|
388 |
if data.get("can_post_messages", False):
|
389 |
await callback.answer("Posted to Your Channel Check Now", True)
|
390 |
await client.send_photo(
|
@@ -407,7 +410,7 @@ async def auto_post_channel(client, callback):
|
|
407 |
await callback.answer("Permissions: can_post_messages", True)
|
408 |
return
|
409 |
|
410 |
-
await callback.answer("You add bot me to your channel as admin! or True/False", True)
|
411 |
return
|
412 |
except Exception as e:
|
413 |
LOGS.error(f"auto_post failed: {str(e)}")
|
|
|
377 |
backup_chat = await db._get_chatbot_chat_from_db(user_id)
|
378 |
data = await db.backup_chatbot.find_one({"user_id": user_id})
|
379 |
if not data:
|
380 |
+
await callback.answer("Can't found user", True)
|
381 |
+
return
|
382 |
file_id = data.get("file_id", None)
|
383 |
if data.get("is_channel_photo", False):
|
384 |
if not file_id:
|
385 |
+
await callback.answer("Can't found file_id or expired", True)
|
386 |
+
return
|
387 |
who_post = data.get("channel_id", None)
|
388 |
if not who_post:
|
389 |
+
await callback.answer("@GeminiAIDev_bot add to your channel as admin!", True)
|
390 |
+
return
|
391 |
if data.get("can_post_messages", False):
|
392 |
await callback.answer("Posted to Your Channel Check Now", True)
|
393 |
await client.send_photo(
|
|
|
410 |
await callback.answer("Permissions: can_post_messages", True)
|
411 |
return
|
412 |
|
413 |
+
await callback.answer("You add bot me to your channel as admin! or channel Mode True/False", True)
|
414 |
return
|
415 |
except Exception as e:
|
416 |
LOGS.error(f"auto_post failed: {str(e)}")
|