Add hash checking to TT downloading
This commit is contained in:
@@ -7,12 +7,12 @@ from telegram_downloader_bot.settings import settings
|
||||
def protected(func):
|
||||
@wraps(func)
|
||||
async def wrapper(client, message):
|
||||
if int(message.from_user.id) not in allowed_ids:
|
||||
if int(message.from_user.id) not in settings.allowed_ids_list:
|
||||
log.warning(
|
||||
f"User with ID {message.from_user.id} attempted"
|
||||
"to text this bot!")
|
||||
log.info(
|
||||
f"Only users allowed are: {' '.join(allowed_ids)}")
|
||||
f"Only users allowed are: {' '.join(settings.allowed_ids_list)}")
|
||||
return await message.reply_text("You are not on the list!")
|
||||
return await func(client, message)
|
||||
return wrapper
|
||||
|
||||
Reference in New Issue
Block a user