ソースを参照

token moved to config.json

master
LeoTheHuman 8年前
コミット
ed6ec622fc
1個のファイルの変更4行の追加3行の削除
  1. 4
    3
      magic-judge-telegram-bot.py

+ 4
- 3
magic-judge-telegram-bot.py ファイルの表示

@@ -241,9 +241,10 @@ def dispatcher_setup(dispatcher):
dispatcher.add_handler(CallbackQueryHandler(callback_name))
dispatcher.add_handler(MessageHandler(Filters.text, text))

with open('token') as file:
token = file.read().strip()
updater = Updater(token)
with open('config.json') as file:
config = json.load(file)

updater = Updater(config['token'])
dispatcher_setup(updater.dispatcher)
updater.start_polling()
updater.idle()

読み込み中…
キャンセル
保存