refactor: update file paths to use /tmp/qqbot for image generation
This commit is contained in:
@@ -34,7 +34,7 @@ func xiBao(msg model.Message) (reply model.Reply) {
|
||||
}
|
||||
xibao.GenerateCongratulationImage(tokens[1], "./resource/xibao_background.png", filePath, true)
|
||||
return model.Reply{
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///root/qqbot/%s]", fileName+".png"),
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///tmp/qqbot/%s]", fileName+".png"),
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
}
|
||||
@@ -46,7 +46,7 @@ func xiBaoTemp(msg model.Message) (reply model.Reply, isTrigger bool) {
|
||||
filePath := util.GenTempFilePath(fmt.Sprintf("%s.png", fileName))
|
||||
xibao.GenerateCongratulationImage(msg.RawMsg, "./resource/xibao_background.png", filePath, true)
|
||||
return model.Reply{
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///root/qqbot/%s]", fileName+".png"),
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///tmp/qqbot/%s]", fileName+".png"),
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
}, true
|
||||
@@ -67,7 +67,7 @@ func beiBao(msg model.Message) (reply model.Reply) {
|
||||
}
|
||||
xibao.GenerateCongratulationImage(tokens[1], "./resource/beibao_background.png", filePath, false)
|
||||
return model.Reply{
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///root/qqbot/%s]", fileName+".png"),
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///tmp/qqbot/%s]", fileName+".png"),
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
}
|
||||
@@ -79,7 +79,7 @@ func beiBaoTemp(msg model.Message) (reply model.Reply, isTrigger bool) {
|
||||
filePath := util.GenTempFilePath(fmt.Sprintf("%s.png", fileName))
|
||||
xibao.GenerateCongratulationImage(msg.RawMsg, "./resource/beibao_background.png", filePath, false)
|
||||
return model.Reply{
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///root/qqbot/%s]", fileName+".png"),
|
||||
ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///tmp/qqbot/%s]", fileName+".png"),
|
||||
ReferOriginMsg: true,
|
||||
FromMsg: msg,
|
||||
}, true
|
||||
|
||||
Reference in New Issue
Block a user