mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Added some spaces?
This commit is contained in:
parent
34b1faae33
commit
a240ec7955
1 changed files with 7 additions and 7 deletions
14
telegram.py
14
telegram.py
|
@ -141,15 +141,15 @@ class Bot:
|
||||||
async with session.request("GET", f"https://api.telegram.org/bot{token}/{endpoint}", params=params) as response:
|
async with session.request("GET", f"https://api.telegram.org/bot{token}/{endpoint}", params=params) as response:
|
||||||
# Check for errors in the request
|
# Check for errors in the request
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
raise TelegramAPIError(f"Request returned {response.status} {response.reason}\n{response.text}")
|
raise TelegramAPIError(f"Request returned {response.status} {response.reason}\n{response.text()}")
|
||||||
# Parse the json data as soon it's ready
|
# Parse the json data as soon it's ready
|
||||||
data = await response.json()
|
data = await response.json()
|
||||||
# Check for errors in the response
|
# Check for errors in the response
|
||||||
if not data["ok"]:
|
if not data["ok"]:
|
||||||
error = data["description"]
|
error = data["description"]
|
||||||
raise TelegramAPIError(f"Response returned an error: {error}")
|
raise TelegramAPIError(f"Response returned an error: {error}")
|
||||||
# Return a dictionary containing the data
|
# Return a dictionary containing the data
|
||||||
return data["result"]
|
return data["result"]
|
||||||
|
|
||||||
|
|
||||||
class Update:
|
class Update:
|
||||||
|
|
Loading…
Reference in a new issue