Skip to content

Commit

Permalink
fix deactivate command
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed May 14, 2024
1 parent ccb1a44 commit 17bcec2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers/tempsDeFlors.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class TempsDeFlors {
}

async setDeactivate (target, bot) {
const oldActiveSpot = await TwitchService.setActiveSpot(0)
if (oldActiveSpot !== 0) {
bot.say(target, `Punto ${oldActiveSpot} desactivado.`)
const channelBeforeUpdate = await TwitchService.setActiveSpot(0)
if (channelBeforeUpdate && channelBeforeUpdate.activeSpot !== 0) {
bot.say(target, `Punto ${channelBeforeUpdate.activeSpot} desactivado.`)
}
}

Expand Down

0 comments on commit 17bcec2

Please sign in to comment.