Skip to content

Commit

Permalink
Merge pull request #4813 from askovpen/dev
Browse files Browse the repository at this point in the history
telegram config.json -> auth json
  • Loading branch information
solderzzc authored Aug 27, 2016
2 parents 44307ae + ff240b7 commit 5e23388
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion configs/auth.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
{"name": "Milan", "coords": "45.472849,9.177567"}
],
"gmapkey": "GOOGLE_MAPS_API_KEY",
"encrypt_location": ""
"encrypt_location": "",
"telegram_token": ""
}
3 changes: 1 addition & 2 deletions configs/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
{
"type": "TelegramTask",
"config": {
"enabled": false,
"api_key": ""
"enabled": false
}
},
{
Expand Down
1 change: 1 addition & 0 deletions pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', [])
Expand Down
2 changes: 1 addition & 1 deletion pokemongo_bot/cell_workers/telegram_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 5e23388

Please sign in to comment.