MCPcopy
hub / github.com/linbailo/zyqinglong / serverJ

Function serverJ

sendNotify.py:152–166  ·  view source on GitHub ↗
(title, content)

Source from the content-addressed store, hash-verified

150 return
151
152def serverJ(title, content):
153 print("\n")
154 if not PUSH_KEY:
155 print("server酱服务的PUSH_KEY未设置!!\n取消推送")
156 return
157 print("serverJ服务启动")
158 data = {
159 "text": title,
160 "desp": content.replace("\n", "\n\n")
161 }
162 response = requests.post(f"https://sc.ftqq.com/{PUSH_KEY}.send", data=data).json()
163 if response['code'] == 0:
164 print('推送成功!')
165 else:
166 print('推送失败!')
167
168# tg通知
169def telegram_bot(title, content):

Callers 1

sendFunction · 0.85

Calls 1

postMethod · 0.45

Tested by

no test coverage detected