Skip to content

Commit

Permalink
Updated To Pyro 2
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTeamAlexa authored Nov 29, 2023
1 parent 290ccd2 commit 5c16fa9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions AlexaMusic/utils/decorators/admins.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup

from pyrogram.enums import ChatType
from config import adminlist
from strings import get_string
from AlexaMusic import app
Expand Down Expand Up @@ -120,7 +120,7 @@ async def wrapper(client, message):
)
except:
return
if not member.can_manage_voice_chats:
if not member.privileges.can_manage_video_chats:
return await message.reply(_["general_5"])
return await mystic(client, message, _)

Expand All @@ -140,7 +140,7 @@ async def wrapper(client, CallbackQuery):
_ = get_string(language)
except:
_ = get_string("en")
if CallbackQuery.message.chat.type == "private":
if CallbackQuery.message.chat.type == ChatType.PRIVATE:
return await mystic(client, CallbackQuery, _)
is_non_admin = await is_nonadmin_chat(CallbackQuery.message.chat.id)
if not is_non_admin:
Expand All @@ -151,7 +151,7 @@ async def wrapper(client, CallbackQuery):
)
except:
return await CallbackQuery.answer(_["general_5"], show_alert=True)
if not a.can_manage_voice_chats:
if not a.privileges.can_manage_video_chats:
if CallbackQuery.from_user.id not in SUDOERS:
token = await int_to_alpha(CallbackQuery.from_user.id)
_check = await get_authuser_names(CallbackQuery.from_user.id)
Expand Down

0 comments on commit 5c16fa9

Please sign in to comment.