|
|
@@ -447,14 +447,17 @@ 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)
|
|
|
if user_id == BOT_ID:
|
|
|
return await message.reply_text("I can't promote myself.")
|
|
|
if not bot.can_promote_members:
|
|
|
return await message.reply_text("I don't have enough permissions")
|
|
|
+
|
|
|
+ umention = (await app.get_users(user_id)).mention
|
|
|
+
|
|
|
if message.command[0][0] == "f":
|
|
|
await message.chat.promote_member(
|
|
|
user_id=user_id,
|