feat: 打印message
This commit is contained in:
parent
38b8fc61ba
commit
7ea2e66d05
@ -16,9 +16,9 @@ export const getMsgText = (body: LarkMessageEvent) => {
|
||||
);
|
||||
// 去掉@_user_1相关的内容,例如 '@_user_1 测试' -> '测试'
|
||||
const textWithoutAt = text.replace(/@_user_\d+/g, "");
|
||||
// 去除空格和换行
|
||||
const textWithoutSpace = textWithoutAt.replace(/[\s\n]/g, "");
|
||||
return textWithoutSpace;
|
||||
// // 去除空格和换行
|
||||
// const textWithoutSpace = textWithoutAt.replace(/[\s\n]/g, "");
|
||||
return textWithoutAt;
|
||||
} catch (e) {
|
||||
return "";
|
||||
}
|
||||
@ -64,6 +64,7 @@ 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") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user