Skip to content

Commit

Permalink
fix(core): too many bot-status-updated, fix koishijs/koishi#1180
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Sep 8, 2023
1 parent 5edd7fa commit 70708ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export abstract class Bot<T extends Bot.Config = Bot.Config> {
}

set status(value) {
if (value === this._status) return
this._status = value
if (this.ctx.bots.includes(this)) {
this.context.emit('bot-status-updated', this)
Expand Down

0 comments on commit 70708ba

Please sign in to comment.