fix: 修正消息清理逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -2,13 +2,11 @@ package robot
|
||||
|
||||
import (
|
||||
"blazing/common/data/xmlres"
|
||||
"blazing/cool"
|
||||
base "blazing/modules/base/service"
|
||||
config "blazing/modules/config/service"
|
||||
"blazing/modules/player/model"
|
||||
"blazing/modules/player/service"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
@@ -61,10 +59,7 @@ func init() {
|
||||
|
||||
itemservice.UPDATE(400501, int(-count))
|
||||
|
||||
msg := ctx.SendChain(message.At(ctx.Event.Sender.ID), message.Reply(ctx.Event.MessageID), message.Text(buf.String()))
|
||||
cool.Cron.AfterFunc(10*time.Second, func() {
|
||||
ctx.DeleteMessage(msg)
|
||||
})
|
||||
ctx.SendChain(message.At(ctx.Event.Sender.ID), message.Reply(ctx.Event.MessageID), message.Text(buf.String()))
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user