feat: 添加简报收集器功能
This commit is contained in:
parent
00b6fc6984
commit
a0a80bbee8
@ -10,7 +10,8 @@
|
||||
"files.autoSave": "afterDelay",
|
||||
"editor.guides.bracketPairs": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
"editor.formatOnSave": true,
|
||||
"github.copilot.chat.localeOverride": "zh-CN"
|
||||
},
|
||||
"extensions": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
|
@ -64,7 +64,6 @@ const filterIllegalMsg = (body: LarkMessageEvent) => {
|
||||
|
||||
const manageCMDMsg = async (body: LarkMessageEvent) => {
|
||||
const text = getMsgText(body);
|
||||
console.log("🚀 ~ manageCMDMsg ~ text:", text);
|
||||
const chatId = getChatId(body);
|
||||
let msgContent = "";
|
||||
if (text === "/id") {
|
||||
@ -84,8 +83,6 @@ const manageCMDMsg = async (body: LarkMessageEvent) => {
|
||||
if (text === "/ci") {
|
||||
msgContent = await fetchCIMonitor();
|
||||
}
|
||||
console.log("🚀 ~ manageCMDMsg ~ 简报:", text.includes("简报"));
|
||||
console.log("🚀 ~ manageCMDMsg ~ share:", text.includes("share"));
|
||||
if (text.includes("share") && text.includes("简报")) {
|
||||
msgContent = await fetchReportCollector(text);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ export const fetchCIMonitor = async () => {
|
||||
};
|
||||
|
||||
export const fetchReportCollector = async (msg: string) => {
|
||||
const url = `https://report.imoaix.cn/report?msg=${msg}`;
|
||||
const url = `https://report.imoaix.cn/summary?msg=${msg}`;
|
||||
try {
|
||||
const res = await fetch(url);
|
||||
return ((await res.json()) as string) || "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user