update
This commit is contained in:
parent
471cf10a02
commit
56679a2b81
14
dingding.py
14
dingding.py
@ -4,6 +4,14 @@ import setting
|
|||||||
url = 'https://oapi.dingtalk.com/robot/send?access_token=c197bfacc77010e92804ecdbb6a6e0f95f86d9e7e4968fb35ec68720eeec8fa8'
|
url = 'https://oapi.dingtalk.com/robot/send?access_token=c197bfacc77010e92804ecdbb6a6e0f95f86d9e7e4968fb35ec68720eeec8fa8'
|
||||||
|
|
||||||
# 发送消息
|
# 发送消息
|
||||||
def send_message(text):
|
def send_message(text, isAtAll = False):
|
||||||
formData = {"msgtype":"text","text":{"content": text},"isAtAll":1}
|
formData = {
|
||||||
print(requests.post(url, data= formData))
|
"msgtype": "text",
|
||||||
|
"text": {
|
||||||
|
"content": text
|
||||||
|
},
|
||||||
|
"at": {
|
||||||
|
"isAtAll": isAtAll
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print(requests.post(url, json=formData).json())
|
||||||
4
main.py
4
main.py
@ -16,8 +16,8 @@ for t in times:
|
|||||||
|
|
||||||
version = 'V1.4'
|
version = 'V1.4'
|
||||||
print(f'Running... {version}')
|
print(f'Running... {version}')
|
||||||
text = f'☕️ 策略已更新\r\n\r\nVersion: {version}'
|
text = f'☕️ 策略已更新 - Version: {version}'
|
||||||
# telegram_sender.send_message(setting.chat_id, text)
|
print(text)
|
||||||
dingding.send_message(text)
|
dingding.send_message(text)
|
||||||
while True:
|
while True:
|
||||||
schedule.run_pending()
|
schedule.run_pending()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user