1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Fixed an AttributeError

This commit is contained in:
Steffo 2016-08-13 16:00:35 +02:00
parent 58bdae9c2e
commit 539b31f260

View file

@ -15,7 +15,7 @@ async def send_message(msg: str, to: int):
"chat_id": to,
"text": msg
}
r = loop.run_in_executor(None, functools.partial(requests.get, params=params),
r = await loop.run_in_executor(None, functools.partial(requests.get, params=params),
"https://api.telegram.org/bot{token}/sendMessage".format(token=token))
if r.status_code == 200:
return