fix: 更新喜报和悲报的帮助信息,支持换行或多消息发送;修正图片文件路径的构建方式,使用动态路径替代静态路径
This commit is contained in:
@@ -15,9 +15,9 @@ import (
|
||||
|
||||
func init() {
|
||||
handler.RegisterHandler("喜报", xiBao, constants.LEVEL_USER)
|
||||
handler.RegisterHelpInform("喜报 [内容]", "喜报/悲报", "生成喜报图片,支持换行")
|
||||
handler.RegisterHelpInform("喜报 [内容]", "喜报/悲报", "生成喜报图片,支持换行或多消息发送")
|
||||
handler.RegisterHandler("悲报", beiBao, constants.LEVEL_USER)
|
||||
handler.RegisterHelpInform("悲报 [内容]", "喜报/悲报", "生成悲报图片,支持换行")
|
||||
handler.RegisterHelpInform("悲报 [内容]", "喜报/悲报", "生成悲报图片,支持换行或多消息发送")
|
||||
}
|
||||
|
||||
func xiBao(msg model.Message) (reply model.Reply) {
|
||||
@@ -37,7 +37,7 @@ func xiBao(msg model.Message) (reply model.Reply) {
|
||||
imageMsg := message.ImageMessage{
|
||||
Type: "image",
|
||||
Data: message.ImageMessageData{
|
||||
File: "file:///tmp/qqbot/" + fileName + ".png",
|
||||
File: "file://" + filePath,
|
||||
},
|
||||
}
|
||||
return model.Reply{
|
||||
@@ -55,7 +55,7 @@ func xiBaoTemp(msg model.Message) (reply model.Reply, isTrigger bool) {
|
||||
imageMsg := message.ImageMessage{
|
||||
Type: "image",
|
||||
Data: message.ImageMessageData{
|
||||
File: "file:///tmp/qqbot/" + fileName + ".png",
|
||||
File: "file://" + filePath,
|
||||
},
|
||||
}
|
||||
return model.Reply{
|
||||
|
||||
Reference in New Issue
Block a user