refactor: update file paths to use /tmp/qqbot for image generation

This commit is contained in:
lixiangwuxian 2025-02-23 01:13:26 +08:00
parent 38940fa07f
commit e0637ab81f
4 changed files with 7 additions and 7 deletions

View File

@ -158,7 +158,7 @@ func getMyRecentScore(msg model.Message) (reply model.Reply) {
func screenShotBL(msg model.Message) (reply model.Reply) {
return model.Reply{
ReplyMsg: "[CQ:image,file=file:///root/qqbot/" + beatleader.GetBLPicture(strconv.Itoa(int(msg.UserId))) + "]",
ReplyMsg: "[CQ:image,file=file:///tmp/qqbot/" + beatleader.GetBLPicture(strconv.Itoa(int(msg.UserId))) + "]",
ReferOriginMsg: true,
FromMsg: msg,
}

View File

@ -25,7 +25,7 @@ func getweb(msg model.Message) (reply model.Reply) {
}
}
return model.Reply{
ReplyMsg: "[CQ:image,file=file:///root/qqbot/getweb/url.png]",
ReplyMsg: "[CQ:image,file=file:///tmp/qqbot/getweb/url.png]",
ReferOriginMsg: true,
FromMsg: msg,
}

View File

@ -176,7 +176,7 @@ func getMyRecentScore(msg model.Message) (reply model.Reply) {
func screenshotSS(msg model.Message) (reply model.Reply) {
return model.Reply{
ReplyMsg: "[CQ:image,file=file:///root/qqbot/" + scoresaber.GetSSPicture(strconv.Itoa(int(msg.UserId))) + "]",
ReplyMsg: "[CQ:image,file=file:///tmp/qqbot/" + scoresaber.GetSSPicture(strconv.Itoa(int(msg.UserId))) + "]",
ReferOriginMsg: true,
FromMsg: msg,
}

View File

@ -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