fixed TypeError when run with Python 3.5
Signed-off-by: klux2 <k.lux.gm@gmail.com>
This commit is contained in:
parent
439ae9f17e
commit
596dd035bf
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue