Added Authorization for Drive List Command.

This commit is contained in:
jaskaranSM 2019-12-29 18:07:12 +05:30 committed by GitHub
parent 0850c41d4d
commit 7c4779cfc6
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ from telegram.ext import CommandHandler, run_async
from bot.helper.mirror_utils.upload_utils.gdriveTools import GoogleDriveHelper
from bot import LOGGER, dispatcher
from bot.helper.telegram_helper.message_utils import auto_delete_message, sendMessage
from bot.helper.telegram_helper.filters import CustomFilters
import threading
from bot.helper.telegram_helper.bot_commands import BotCommands
@ -20,5 +21,5 @@ def list_drive(bot,update):
threading.Thread(target=auto_delete_message, args=(bot, update.message, reply_message)).start()
list_handler = CommandHandler(BotCommands.ListCommand, list_drive)
list_handler = CommandHandler(BotCommands.ListCommand, list_drive,filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
dispatcher.add_handler(list_handler)