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:
parent
58bdae9c2e
commit
539b31f260
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ async def send_message(msg: str, to: int):
|
||||||
"chat_id": to,
|
"chat_id": to,
|
||||||
"text": msg
|
"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))
|
"https://api.telegram.org/bot{token}/sendMessage".format(token=token))
|
||||||
if r.status_code == 200:
|
if r.status_code == 200:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue