try fixes
This commit is contained in:
parent
7ec5c507cb
commit
20011a0f8e
@ -1,7 +1,8 @@
|
|||||||
from cache.admins import admins
|
from cache.admins import admins
|
||||||
from driver.veez import call_py, bot
|
from driver.veez import call_py, bot
|
||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
from program.utils.chat_author import adminsOnly
|
from driver.chat_author import adminsOnly
|
||||||
|
from driver.perms import member_permissions
|
||||||
from driver.queues import QUEUE, clear_queue
|
from driver.queues import QUEUE, clear_queue
|
||||||
from driver.filters import command, other_filters
|
from driver.filters import command, other_filters
|
||||||
from driver.decorators import authorized_users_only
|
from driver.decorators import authorized_users_only
|
||||||
@ -16,14 +17,6 @@ from pyrogram.types import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def member_permissions(chat_id: int, user_id: int):
|
|
||||||
perms = []
|
|
||||||
member = await bot.get_chat_member(chat_id, user_id)
|
|
||||||
if member.can_manage_voice_chats:
|
|
||||||
perms.append("can_manage_voice_chats")
|
|
||||||
return perms
|
|
||||||
|
|
||||||
|
|
||||||
@Client.on_message(command(["reload", f"reload@{BOT_USERNAME}"]) & other_filters)
|
@Client.on_message(command(["reload", f"reload@{BOT_USERNAME}"]) & other_filters)
|
||||||
@authorized_users_only
|
@authorized_users_only
|
||||||
async def update_admin(client, message):
|
async def update_admin(client, message):
|
||||||
|
Loading…
Reference in New Issue
Block a user