diff --git a/handler/xibao/xibao.go b/handler/xibao/xibao.go index b7808f3..156c5d3 100644 --- a/handler/xibao/xibao.go +++ b/handler/xibao/xibao.go @@ -40,10 +40,10 @@ func xiBao(msg model.Message) (reply model.Reply) { } func xiBaoTemp(msg model.Message) (reply model.Reply, isTrigger bool) { + handler.UnRegisterLiveHandler(msg.GroupInfo.GroupId, msg.UserId) fileName := uuid.New().String() filePath := "./tmp/" + fileName + ".png" xibao.GenerateCongratulationImage(msg.RawMsg, "./resource/xibao_background.png", filePath, true) - handler.UnRegisterLiveHandler(msg.GroupInfo.GroupId, msg.UserId) return model.Reply{ ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///root/qqbot/tmp/%s]", fileName+".png"), ReferOriginMsg: true, @@ -73,10 +73,10 @@ func beiBao(msg model.Message) (reply model.Reply) { } func beiBaoTemp(msg model.Message) (reply model.Reply, isTrigger bool) { + handler.UnRegisterLiveHandler(msg.GroupInfo.GroupId, msg.UserId) fileName := uuid.New().String() filePath := "./tmp/" + fileName + ".png" xibao.GenerateCongratulationImage(msg.RawMsg, "./resource/beibao_background.png", filePath, false) - handler.UnRegisterLiveHandler(msg.GroupInfo.GroupId, msg.UserId) return model.Reply{ ReplyMsg: fmt.Sprintf("[CQ:image,file=file:///root/qqbot/tmp/%s]", fileName+".png"), ReferOriginMsg: true,