First commit
This commit is contained in:
commit
c43e1e9142
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})
|
Loading…
Reference in New Issue
Block a user