detect Anonymous Admin
This commit is contained in:
parent
50ef69cde3
commit
ead8f944a8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user