First commit
This commit is contained in:
12
telegram.py
Normal file
12
telegram.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import requests
|
||||||
|
from credentials import secrets
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TOKEN=secrets.get("token")
|
||||||
|
CHAT_ID=secrets.get("chat_id")
|
||||||
|
SEND_URL = f"https://api.telegram.org/bot{TOKEN}/sendMessage"
|
||||||
|
|
||||||
|
message="Hi there"
|
||||||
|
|
||||||
|
requests.post(SEND_URL, json={"chat_id": CHAT_ID, "text": message})
|
||||||
Reference in New Issue
Block a user