detect Anonymous Admin

This commit is contained in:
levina 2021-11-05 17:26:28 +07:00 committed by GitHub
parent 50ef69cde3
commit ead8f944a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,6 +165,8 @@ async def cbsudo(_, query: CallbackQuery):
@Client.on_callback_query(filters.regex("cbmenu"))
async def cbmenu(_, query: CallbackQuery):
if query.message.sender_chat:
return await query.answer("you're an Anonymous Admin !\n\n» revert back to user account from admin rights.")
a = await _.get_chat_member(query.message.chat.id, query.from_user.id)
if not a.can_manage_voice_chats:
return await query.answer("💡 only admin with manage voice chats permission that can tap this button !", show_alert=True)