fix: 优化连续对话逻辑

This commit is contained in:
Mio Kurumio 2025-03-03 12:47:53 +08:00
parent b2b3d7b6c5
commit da22a94259

View file

@ -51,17 +51,13 @@ export class bym extends plugin {
async _handleReply(e) {
if(Config.bymContinue){
const delay = Config.bymContinueDelay || 10
this.setContext("_handleContinue", false, delay, "")
}
let sender = e.sender.user_id
let card = e.sender.card || e.sender.nickname
let group = e.group_id
let fuck = false
let candidate = Config.bymPreset
let delay = Config.bymContinueDelay || 10
if (Config.bymFuckList?.find(i => e.msg?.includes(i))) {
fuck = true
candidate = candidate + Config.bymFuckPrompt
@ -115,6 +111,11 @@ export class bym extends plugin {
await this.reply(finalMsg, (this._genProp() < 10), {
recallMsg: fuck ? 10 : 0
})
if (Config.bymContinue) {
this.finish("_handleContinue", false)
this.setContext("_handleContinue", false, delay, "")
}
}
}
@ -126,8 +127,8 @@ export class bym extends plugin {
}
async _handleContinue(e) {
logger.mark("bym继续对话")
this.finish("_handleContinue", e.isGroup)
logger.mark("bym continue")
this.finish("_handleContinue", false)
await this._handleReply(e)
}
}