feat: 周报日报功能抽离
This commit is contained in:
parent
a8dd0194b5
commit
3e46b946e9
@ -125,35 +125,36 @@ const manageCMDMsg = (ctx: Context.Data) => {
|
||||
return
|
||||
}
|
||||
|
||||
// 仅限群组功能
|
||||
if (chatType === "group") {
|
||||
// 注册群组
|
||||
if (msgText === "开启日报、周报") {
|
||||
logger.info(`bot command is register, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "register")
|
||||
return
|
||||
}
|
||||
// 注销群组
|
||||
if (msgText === "关闭日报、周报") {
|
||||
logger.info(`bot command is unregister, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "unregister")
|
||||
return
|
||||
}
|
||||
// 立即发送日简报
|
||||
if (msgText === "发送日报") {
|
||||
logger.info(`bot command is summary, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "summary", "daily")
|
||||
return
|
||||
}
|
||||
// 立即发送周简报
|
||||
if (msgText === "发送周报") {
|
||||
logger.info(`bot command is summary, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "summary", "weekly")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// michat专属功能
|
||||
if (app === "michat") {
|
||||
// 仅限群组功能
|
||||
if (chatType === "group") {
|
||||
// 注册群组
|
||||
if (msgText === "开启日报、周报") {
|
||||
logger.info(`bot command is register, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "register")
|
||||
return
|
||||
}
|
||||
// 注销群组
|
||||
if (msgText === "关闭日报、周报") {
|
||||
logger.info(`bot command is unregister, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "unregister")
|
||||
return
|
||||
}
|
||||
// 立即发送日简报
|
||||
if (msgText === "发送日报") {
|
||||
logger.info(`bot command is summary, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "summary", "daily")
|
||||
return
|
||||
}
|
||||
// 立即发送周简报
|
||||
if (msgText === "发送周报") {
|
||||
logger.info(`bot command is summary, chatId: ${chatId}`)
|
||||
attachService.groupAgent(app, body, "summary", "weekly")
|
||||
return
|
||||
}
|
||||
}
|
||||
// 帮助
|
||||
logger.info(`bot command is /help, chatId: ${chatId}`)
|
||||
manageHelpMsg(ctx, "miChatGuide")
|
||||
|
Loading…
x
Reference in New Issue
Block a user