feat: 添加悲报
This commit is contained in:
@@ -8,10 +8,11 @@ import (
|
||||
|
||||
func init() {
|
||||
handler.RegisterHandler("喜报", xiBao)
|
||||
handler.RegisterHandler("悲报", beiBao)
|
||||
}
|
||||
|
||||
func xiBao(msg model.Message) (reply model.Reply) {
|
||||
xibao.GenerateCongratulationImage(msg.Msg[len("喜报 "):], "./tmp/xibao.png")
|
||||
xibao.GenerateCongratulationImage(msg.Msg[len("喜报 "):], "./resource/xibao_background.png", "./tmp/xibao.png", true)
|
||||
return model.Reply{
|
||||
ReplyMsg: "[CQ:image,file=file:///root/qqbot/tmp/xibao.png]",
|
||||
ReferOriginMsg: true,
|
||||
@@ -19,4 +20,11 @@ func xiBao(msg model.Message) (reply model.Reply) {
|
||||
}
|
||||
}
|
||||
|
||||
//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
|
||||
func beiBao(msg model.Message) (reply model.Reply) {
|
||||
xibao.GenerateCongratulationImage(msg.Msg[len("悲报 "):], "./resource/beibao_background.png", "./tmp/beibao.png", false)
|
||||
return model.Reply{
|
||||
ReplyMsg: "[CQ:image,file=file:///root/qqbot/tmp/beibao.png]",
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user