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 28, 2023
1 parent 57e1481 commit 57eb8c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion AlexaMusic/plugins/tools/reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import asyncio

from pyrogram import filters
from pyrogram.enums import ChatMembersFilter
from pyrogram.types import CallbackQuery, Message

from config import BANNED_USERS, MUSIC_BOT_NAME, adminlist, lyrical
Expand All @@ -36,7 +37,11 @@
async def reload_admin_cache(client, message: Message, _):
try:
chat_id = message.chat.id
admins = await app.get_chat_members(chat_id, filter="administrators")
admins = []
async for m in app.get_chat_members(
chat_id, filter=ChatMembersFilter.ADMINISTRATORS
):
admins.append(m)
authusers = await get_authuser_names(chat_id)
adminlist[chat_id] = []
for user in admins:
Expand Down

0 comments on commit 57eb8c0

Please sign in to comment.