init: 初始化仓库

This commit is contained in:
lixiangwuxian
2024-10-08 01:34:26 +08:00
commit 4d6c22ff7b
24 changed files with 1311 additions and 0 deletions

21
handler/say/say.go Normal file
View File

@@ -0,0 +1,21 @@
package say
import (
"git.lxtend.com/qqbot/handler"
"git.lxtend.com/qqbot/model"
)
func init() {
handler.RegisterHandler("记下", say)
}
func say(msg model.Message) (reply model.Reply) {
if len(msg.Msg) <= 5 {
return model.Reply{}
}
return model.Reply{
ReplyMsg: msg.Msg[5:],
ReferOriginMsg: true,
FromMsg: msg,
}
}