diff --git a/userge/plugins/admin/purge.py b/userge/plugins/admin/purge.py index 61417f12c..00220ab56 100644 --- a/userge/plugins/admin/purge.py +++ b/userge/plugins/admin/purge.py @@ -1,8 +1,10 @@ import datetime -from userge import Message, userge from pyrogram.errors import MessageDeleteForbidden +from userge import Message, userge + + @userge.on_cmd( "purge", about={ @@ -56,7 +58,7 @@ async def handle_msg(a_message): chat_id=message.chat.id, message_ids=list_of_messages ) except MessageDeleteForbidden: - return + return purged_messages_count += len(list_of_messages) list_of_messages = []