MCPcopy
hub / github.com/smallfawn/QLScriptPublic / go_cqhttp

Function go_cqhttp

notify.py:259–273  ·  view source on GitHub ↗

使用 go_cqhttp 推送消息。

(title: str, content: str)

Source from the content-addressed store, hash-verified

257
258
259def go_cqhttp(title: str, content: str) -> None:
260 """
261 使用 go_cqhttp 推送消息。
262 """
263 if not push_config.get("GOBOT_URL") or not push_config.get("GOBOT_QQ"):
264 return
265 print("go-cqhttp 服务启动")
266
267 url = f'{push_config.get("GOBOT_URL")}?access_token={push_config.get("GOBOT_TOKEN")}&{push_config.get("GOBOT_QQ")}&message=标题:{title}\n内容:{content}'
268 response = requests.get(url).json()
269
270 if response["status"] == "ok":
271 print("go-cqhttp 推送成功!")
272 else:
273 print("go-cqhttp 推送失败!")
274
275
276def gotify(title: str, content: str) -> None:

Callers

nothing calls this directly

Calls 2

printFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected