1
0
mirror of https://gitlab.com/ceda_ei/the-long-night synced 2025-07-05 21:56:53 +02:00
the-long-night/backends/telegram.py

12 lines
261 B
Python

import requests
def send(tg_config, message):
url = "https://api.telegram.org/bot{}/sendMessage".format(
tg_config["bot_token"])
data = {
"chat_id": tg_config["user_id"],
"text": message
}
requests.post(url, data=data)