Forráskód Böngészése

bug moment (#162)

* bug moment

* a

Co-authored-by: Akshay Rajput <thehamkercat@gmail.com>
Aarav Arora 4 éve
szülő
commit
3f2c377fd3
1 módosított fájl, 5 hozzáadás és 3 törlés
  1. 5 3
      wbb/modules/admin.py

+ 5 - 3
wbb/modules/admin.py

@@ -315,9 +315,11 @@ async def unban_func(_, message: Message):
     # normal users won't get text_mention if the user
     # they want to unban is not in the group.
     reply = message.reply_to_message
-    if (reply.sender_chat
-       and reply.sender_chat != message.chat.id):
-        return await message.reply_text("Unbanning a Channel?,we dont do it here")
+    
+    if (reply and reply.sender_chat 
+        and reply.sender_chat != message.chat.id):
+        return await message.reply_text("You cannot unban a channel")
+        
     if len(message.command) == 2:
         user = message.text.split(None, 1)[1]
     elif len(message.command) == 1 and reply: