mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-06 20:04:51 +00:00
Fix message handling and logging format
Some checks failed
Notify on Telegram / notify (push) Has been cancelled
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:
parent
8adfb935b5
commit
326b17995f
1 changed files with 3 additions and 3 deletions
6
utils.py
6
utils.py
|
|
@ -69,17 +69,17 @@ def demoji(teks):
|
||||||
|
|
||||||
async def broadcast_messages(user_id, message):
|
async def broadcast_messages(user_id, message):
|
||||||
try:
|
try:
|
||||||
await message.copy(chat_id=user_id)
|
await message.forward(chat_id=user_id)
|
||||||
return True, "Succes"
|
return True, "Succes"
|
||||||
except FloodWait as e:
|
except FloodWait as e:
|
||||||
await asyncio.sleep(e.value)
|
await asyncio.sleep(e.value)
|
||||||
return await broadcast_messages(user_id, message)
|
return await broadcast_messages(user_id, message)
|
||||||
except InputUserDeactivated:
|
except InputUserDeactivated:
|
||||||
await db.delete_user(int(user_id))
|
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"
|
return False, "Deleted"
|
||||||
except UserIsBlocked:
|
except UserIsBlocked:
|
||||||
LOGGER.info(f"{user_id} -Blocked the bot.")
|
LOGGER.info(f"{user_id} - Blocked the bot.")
|
||||||
return False, "Blocked"
|
return False, "Blocked"
|
||||||
except PeerIdInvalid:
|
except PeerIdInvalid:
|
||||||
await db.delete_user(int(user_id))
|
await db.delete_user(int(user_id))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue