MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / sendMsg

Method sendMsg

tools/env.js:61–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 return String(v);
60 }
61 async sendMsg() {
62 this.log("==============📣Center 通知📣==============")
63 let message = this.notifyStr.join(this.logSeparator);
64 if (this.isNode()) {
65 try {
66 const { sendNotify } = require("./sendNotify.js")
67 await sendNotify(this.name, message);
68 } catch (e) {
69 console.error(e.code === "MODULE_NOT_FOUND" ? "发送通知失败: 未找到 sendNotify.js 模块" : `发送通知失败: sendNotify.js 内部错误 (${e.message})`);
70 }
71
72 }
73 }
74 isNode() {
75 return "undefined" != typeof module && !!module.exports;
76 }

Callers 1

doneMethod · 0.45

Calls 4

sendNotifyFunction · 0.70
logMethod · 0.45
isNodeMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected