From 03adc8d734442a9035bd56064d1ebf43029bb2a4 Mon Sep 17 00:00:00 2001 From: Alexander Skovpen Date: Sat, 27 Aug 2016 18:26:08 +0300 Subject: [PATCH 1/3] config.json -> auth.json --- configs/auth.json.example | 3 ++- configs/config.json.example | 1 - pokemongo_bot/cell_workers/telegram_task.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/auth.json.example b/configs/auth.json.example index 04c8fa5e35..441a1c1f2d 100644 --- a/configs/auth.json.example +++ b/configs/auth.json.example @@ -7,5 +7,6 @@ {"name": "Milan", "coords": "45.472849,9.177567"} ], "gmapkey": "GOOGLE_MAPS_API_KEY", - "encrypt_location": "" + "encrypt_location": "", + "telegram_token": "" } diff --git a/configs/config.json.example b/configs/config.json.example index be57cb6c8f..97a41b6485 100644 --- a/configs/config.json.example +++ b/configs/config.json.example @@ -11,7 +11,6 @@ "type": "TelegramTask", "config": { "enabled": false, - "api_key": "" } }, { diff --git a/pokemongo_bot/cell_workers/telegram_task.py b/pokemongo_bot/cell_workers/telegram_task.py index 3ae5dcc1da..8dbd5a00ac 100644 --- a/pokemongo_bot/cell_workers/telegram_task.py +++ b/pokemongo_bot/cell_workers/telegram_task.py @@ -11,7 +11,7 @@ class TelegramTask(BaseTask): tbot = None def initialize(self): - api_key = self.config.get('api_key') + api_key = self.bot.config.telegram_token if api_key == None: self.emit_event( 'config_error', From 7f135d6f7a41b9dab89d9ca3cfce5524557c1f3d Mon Sep 17 00:00:00 2001 From: Alexander Skovpen Date: Sat, 27 Aug 2016 18:30:27 +0300 Subject: [PATCH 2/3] fix --- pokecli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pokecli.py b/pokecli.py index f42feedbdc..d57aa76caa 100644 --- a/pokecli.py +++ b/pokecli.py @@ -628,6 +628,7 @@ def _json_loader(filename): config.favorite_locations = load.get('favorite_locations', []) config.encrypt_location = load.get('encrypt_location', '') + config.telegram_token = load.get('telegram_token', '') config.catch = load.get('catch', {}) config.release = load.get('release', {}) config.plugins = load.get('plugins', []) From ff240b7bb6ce49b905ab45e8c7565c9d5f734f18 Mon Sep 17 00:00:00 2001 From: Alexander Skovpen Date: Sat, 27 Aug 2016 18:31:05 +0300 Subject: [PATCH 3/3] fix --- configs/config.json.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/config.json.example b/configs/config.json.example index 97a41b6485..320cadcf1f 100644 --- a/configs/config.json.example +++ b/configs/config.json.example @@ -10,7 +10,7 @@ { "type": "TelegramTask", "config": { - "enabled": false, + "enabled": false } }, {