Fix message handling and logging format
Some checks failed
Notify on Telegram / notify (push) Has been cancelled

Signed-off-by: Yasir Aris M <git@yasir.id>
This commit is contained in:
Yasir Aris M 2025-12-30 21:35:32 +07:00 committed by GitHub
parent 8adfb935b5
commit 326b17995f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,17 +69,17 @@ def demoji(teks):
async def broadcast_messages(user_id, message):
try:
await message.copy(chat_id=user_id)
await message.forward(chat_id=user_id)
return True, "Succes"
except FloodWait as e:
await asyncio.sleep(e.value)
return await broadcast_messages(user_id, message)
except InputUserDeactivated:
await db.delete_user(int(user_id))
LOGGER.info(f"{user_id}-Removed from Database, since deleted account.")
LOGGER.info(f"{user_id} - Removed from Database, since deleted account.")
return False, "Deleted"
except UserIsBlocked:
LOGGER.info(f"{user_id} -Blocked the bot.")
LOGGER.info(f"{user_id} - Blocked the bot.")
return False, "Blocked"
except PeerIdInvalid:
await db.delete_user(int(user_id))