From 9390d564041225cbdc6061db7fddf3e1b10c92df Mon Sep 17 00:00:00 2001 From: 3err0 Date: Sun, 23 Jun 2019 14:02:22 +0800 Subject: [PATCH] check permission fixes --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 8ff9b48..1223f3f 100644 --- a/main.py +++ b/main.py @@ -16,11 +16,9 @@ bot = telebot.TeleBot(config.bot_token) #telebot.logger.setLevel(logging.DEBUG) def check_permission(uid): - user = str(uid) - for userid in config.users: - if userid == user: - return True - return False + if uid not in config.users: + return False + return True def file_ext(filename): return filename.split(".")[-1]