Skip to content

Commit

Permalink
fix: 没有删除黑白名单
Browse files Browse the repository at this point in the history
  • Loading branch information
XasYer committed Nov 21, 2024
1 parent 75b2f52 commit e1f51c8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,16 @@ export const rule = {
await e.reply(`${id}已经在${regRet[2]}名单中了~`)
} else {
data.push(id)
await e.reply(`已将${id}${regRet[1]}${regRet[2]}名单了~现在的${regRet[2]}名单是:\n ${data.join(', ') || '空'}`)
await e.reply(`已将${id}添加到${regRet[2]}名单了~现在的${regRet[2]}名单是:\n ${data.join(', ') || '空'}`)
Config.modify('push', target, data)
}
} else {
const index = data.findIndex(i => i.id == id)
if (index === -1) {
await e.reply(`${id}不在${regRet[2]}名单中~`)
} else {
data.splice(index, 1)
await e.reply(`已将${id}移出${regRet[2]}名单了~现在的${regRet[2]}名单是:\n ${data.join(', ') || '空'}`)
Config.modify('push', target, data)
}
}
Expand Down

0 comments on commit e1f51c8

Please sign in to comment.