diff --git a/main.py b/main.py index cba7f2b..cf650b1 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,5 @@ import logging +import os from telegram import InlineKeyboardMarkup from telegram.ext import Updater, CallbackQueryHandler, MessageHandler, Filters @@ -40,8 +41,11 @@ def download_choosen_format(update, context): context.bot.delete_message(chat_id=query.message.chat_id, message_id=query.message.message_id) +TOKEN = None +with open('bot.token') as f: + TOKEN = f.read().strip() -updater = Updater(token="") +updater = Updater(token=TOKEN) updater.dispatcher.add_handler(MessageHandler(Filters.text, get_format)) updater.dispatcher.add_handler(CallbackQueryHandler(download_choosen_format))