qq_bot/handler/xibao/xibao.go
2024-10-09 01:30:50 +08:00

23 lines
611 B
Go

package xibao
import (
"git.lxtend.com/qqbot/handler"
"git.lxtend.com/qqbot/model"
"git.lxtend.com/qqbot/service/xibao"
)
func init() {
handler.RegisterHandler("喜报", xiBao)
}
func xiBao(msg model.Message) (reply model.Reply) {
xibao.GenerateCongratulationImage(msg.Msg[len("喜报 "):], "./tmp/xibao.png")
return model.Reply{
ReplyMsg: "[CQ:image,file=file:///root/qqbot/tmp/xibao.png]",
ReferOriginMsg: true,
FromMsg: msg,
}
}
//docker run -d --name qqbot -v /root/qqbot:/root/qqbot -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro --restart=always qqbot