mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-06 15:20:22 +00:00
fix(aichat): cannot save config
This commit is contained in:
@@ -182,17 +182,18 @@ func init() {
|
||||
logrus.Infoln("[aichat] 回复内容:", t)
|
||||
recCfg := airecord.GetConfig()
|
||||
record := ""
|
||||
if !stor.norecord() {
|
||||
if !fastfailnorecord && !stor.norecord() {
|
||||
record = ctx.GetAIRecord(recCfg.ModelID, recCfg.Customgid, t)
|
||||
}
|
||||
if record != "" {
|
||||
ctx.SendChain(message.Record(record))
|
||||
} else {
|
||||
if id != nil {
|
||||
id = ctx.SendChain(message.Reply(id), message.Text(t))
|
||||
} else {
|
||||
id = ctx.SendChain(message.Text(t))
|
||||
if record != "" {
|
||||
ctx.SendChain(message.Record(record))
|
||||
continue
|
||||
}
|
||||
fastfailnorecord = true
|
||||
}
|
||||
if id != nil {
|
||||
id = ctx.SendChain(message.Reply(id), message.Text(t))
|
||||
} else {
|
||||
id = ctx.SendChain(message.Text(t))
|
||||
}
|
||||
process.SleepAbout1sTo2s()
|
||||
}
|
||||
|
||||
@@ -13,6 +13,10 @@ const (
|
||||
bitmapnrat = 0x040000
|
||||
)
|
||||
|
||||
var (
|
||||
fastfailnorecord = false
|
||||
)
|
||||
|
||||
type storage ctxext.Storage
|
||||
|
||||
func newstorage(ctx *zero.Ctx, gid int64) (storage, error) {
|
||||
|
||||
Reference in New Issue
Block a user