feat: 添加关键词回复

This commit is contained in:
lixiangwuxian
2024-10-20 15:47:00 +08:00
parent 003c9b6f90
commit 5a56f6fdc7
9 changed files with 340 additions and 32 deletions

28
handler/wordle/wordle.go Normal file
View File

@@ -0,0 +1,28 @@
package wordle
import (
"git.lxtend.com/qqbot/constants"
"git.lxtend.com/qqbot/handler"
"git.lxtend.com/qqbot/model"
)
func init() {
handler.RegisterHandler("wordle", wordle, constants.LEVEL_USER)
}
func wordle(msg model.Message) (reply model.Reply) {
handler.RegisterLiveHandler(msg.GroupInfo.GroupId, msg.UserId, tempTrigger)
return model.Reply{
ReplyMsg: "",
ReferOriginMsg: true,
FromMsg: msg,
}
}
func tempTrigger(msg model.Message) (reply model.Reply, isTrigger bool) {
return model.Reply{
ReplyMsg: " ",
ReferOriginMsg: true,
FromMsg: msg,
}, true
}