update:sms
This commit is contained in:
12
smssend/tgbot.py
Normal file
12
smssend/tgbot.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import requests
|
||||
# bot发消息到tg群组
|
||||
def sendTg(message):
|
||||
baseUrl="https://api.telegram.org/bot"
|
||||
toekn="558659722:AAENA3v8gKq7R7_nsr8V58Iu-_Z6BWx2SCw"
|
||||
chat_id="-861577609"
|
||||
text=message
|
||||
url=f'{baseUrl}{toekn}/sendMessage?chat_id={chat_id}&text={text}'
|
||||
r = requests.get(url)
|
||||
# https://api.telegram.org/bot558659722:AAENA3v8gKq7R7_nsr8V58Iu-_Z6BWx2SCw/sendMessage?chat_id=-861577609&text=1234
|
||||
|
||||
sendTg('123python')
|
||||
Reference in New Issue
Block a user