Skip to content

Commit

Permalink
low cooldown for TF captures
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed May 15, 2024
1 parent f06fabd commit c01eb3d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,19 @@ class Messenger {
if (textSplit.length > 0 && inputParser.isAskingForTFScreenshot(textSplit[0]) && await handlers.tempsDeFlors.hasActiveSpot()) {
if (!this.cooldown.screenshotTF) {
this.cooldown.screenshotTF = true
this.cooldown.screenshot = true
setTimeout(() => {
this.cooldown.screenshotTF = false
}, 10000)
}, 2000)
setTimeout(() => {
this.cooldown.screenshot = false
}, 30000)
return handlers.tempsDeFlors.captureScreenshot(target, textSplit[1], this.bot, context['display-name'], context['room-id'])
}
}

if (textSplit.length > 0 && inputParser.isAskingForTakeScreenshot(textSplit[0])){
if (!this.cooldown.screenshot && !this.cooldown.screenshotTF) {
if (!this.cooldown.screenshot) {
this.cooldown.screenshot = true
setTimeout(() => {
this.cooldown.screenshot = false
Expand Down

0 comments on commit c01eb3d

Please sign in to comment.