Sfoglia il codice sorgente

Full promote styling (#118)

Aarav Arora 5 anni fa
parent
commit
bc20dfb3ce
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      wbb/modules/admin.py

+ 3 - 2
wbb/modules/admin.py

@@ -307,6 +307,7 @@ async def deleteFunc(_, message: Message):
 @adminsOnly("can_promote_members")
 async def promoteFunc(_, message: Message):
     user_id = await extract_user(message)
+    umention = (await app.get_users(user_id)).mention
     if not user_id:
         return await message.reply_text("I can't find that user.")
     bot = await app.get_chat_member(message.chat.id, BOT_ID)
@@ -326,7 +327,7 @@ async def promoteFunc(_, message: Message):
             can_manage_chat=bot.can_manage_chat,
             can_manage_voice_chats=bot.can_manage_voice_chats,
         )
-        return await message.reply_text("Promoted! With All Rights")
+        return await message.reply_text(f"Fully Promoted! {umention}")
 
     await message.chat.promote_member(
         user_id=user_id,
@@ -339,7 +340,7 @@ async def promoteFunc(_, message: Message):
         can_manage_chat=bot.can_manage_chat,
         can_manage_voice_chats=bot.can_manage_voice_chats,
     )
-    await message.reply_text("Promoted!")
+    await message.reply_text(f"Promoted! {umention}")
 
 
 # Demote Member