From ead8f944a8b54bb9b75a8139898350f92f1f43ae Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Fri, 5 Nov 2021 17:26:28 +0700 Subject: [PATCH] detect `Anonymous Admin` --- program/callback.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/program/callback.py b/program/callback.py index 8380344..59f253d 100644 --- a/program/callback.py +++ b/program/callback.py @@ -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)