1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Send formatted messages

This commit is contained in:
Steffo 2016-08-13 16:51:26 +02:00
parent f2f3f449bd
commit 54ebf6b9a7

View file

@ -14,7 +14,8 @@ async def send_message(msg: str, to: int):
# Send the message
params = {
"chat_id": to,
"text": msg
"text": msg,
"parse_mode": "Markdown"
}
r = await loop.run_in_executor(None, functools.partial(requests.get, params=params),
"https://api.telegram.org/bot{token}/sendMessage".format(token=token))