From 8d27ee191e43d25eb0b73dbc1cd37fd429372930 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Wed, 19 Jan 2022 21:29:27 +0700 Subject: [PATCH] missing --- program/admins.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/program/admins.py b/program/admins.py index 4f87063..f3608e8 100644 --- a/program/admins.py +++ b/program/admins.py @@ -40,6 +40,8 @@ async def update_admin(client, message): @Client.on_message(command(["skip", f"skip@{BOT_USERNAME}", "vskip"]) & other_filters) async def skip(client, m: Message): + if m.sender_chat: + return await m.reply_text("you're an __Anonymous__ Admin !\n\n» revert back to user account.") permission = "can_manage_voice_chats" s = await adminsOnly(permission, m) if s == 1: @@ -85,6 +87,8 @@ async def skip(client, m: Message): & other_filters ) async def stop(client, m: Message): + if m.sender_chat: + return await m.reply_text("you're an __Anonymous__ Admin !\n\n» revert back to user account.") permission = "can_manage_voice_chats" s = await adminsOnly(permission, m) if s == 1: @@ -105,6 +109,8 @@ async def stop(client, m: Message): command(["pause", f"pause@{BOT_USERNAME}", "vpause"]) & other_filters ) async def pause(client, m: Message): + if m.sender_chat: + return await m.reply_text("you're an __Anonymous__ Admin !\n\n» revert back to user account.") permission = "can_manage_voice_chats" s = await adminsOnly(permission, m) if s == 1: @@ -126,6 +132,8 @@ async def pause(client, m: Message): command(["resume", f"resume@{BOT_USERNAME}", "vresume"]) & other_filters ) async def resume(client, m: Message): + if m.sender_chat: + return await m.reply_text("you're an __Anonymous__ Admin !\n\n» revert back to user account.") permission = "can_manage_voice_chats" s = await adminsOnly(permission, m) if s == 1: @@ -147,6 +155,8 @@ async def resume(client, m: Message): command(["mute", f"mute@{BOT_USERNAME}", "vmute"]) & other_filters ) async def mute(client, m: Message): + if m.sender_chat: + return await m.reply_text("you're an __Anonymous__ Admin !\n\n» revert back to user account.") permission = "can_manage_voice_chats" s = await adminsOnly(permission, m) if s == 1: @@ -168,6 +178,8 @@ async def mute(client, m: Message): command(["unmute", f"unmute@{BOT_USERNAME}", "vunmute"]) & other_filters ) async def unmute(client, m: Message): + if m.sender_chat: + return await m.reply_text("you're an __Anonymous__ Admin !\n\n» revert back to user account.") permission = "can_manage_voice_chats" s = await adminsOnly(permission, m) if s == 1: @@ -278,6 +290,8 @@ async def cbunmute(_, query: CallbackQuery): command(["volume", f"volume@{BOT_USERNAME}", "vol"]) & other_filters ) async def change_volume(client, m: Message): + if m.sender_chat: + return await m.reply_text("you're an __Anonymous__ Admin !\n\n» revert back to user account.") permission = "can_manage_voice_chats" s = await adminsOnly(permission, m) if s == 1: