fixed TypeError when run with Python 3.5

Signed-off-by: klux2 <k.lux.gm@gmail.com>
This commit is contained in:
klux2 2019-07-04 14:29:32 +02:00
parent 439ae9f17e
commit 596dd035bf
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ def get_bot_id() -> int:
if botID == -1:
api_url = "https://api.telegram.org/bot" + telegram_bot_token + "/getMe"
with urllib.request.urlopen(api_url) as response:
data = json.load(response)
data = json.loads(response.read().decode('utf-8'))
botID = data["result"]["id"]
return botID