Skip to content

Commit

Permalink
system/gambling: Fix !fightme timeouts
Browse files Browse the repository at this point in the history
_ref: #929
  • Loading branch information
sogehige committed Apr 19, 2018
1 parent 52561f7 commit 9ec3fb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/systems/gambling.js
Expand Up @@ -336,13 +336,13 @@ class Gambling {
debug('vs mod')
global.commons.sendMessage(global.translate('gambling.fightme.oneModerator')
.replace(/\$winner/g, isMod.sender ? sender.username : username), sender)
global.client.timeout(isMod.sender ? username : sender.username, await global.configuration.getValue('fightmeTimeout'))
global.commons.timeout(isMod.sender ? username : sender.username, null, await global.configuration.getValue('fightmeTimeout'))
global.db.engine.remove(`${self.collection}.fightme`, { _id: challenge._id.toString() })
return
}

debug('user vs user')
global.client.timeout(winner ? sender.username : username, await global.configuration.getValue('fightmeTimeout'))
global.commons.timeout(winner ? sender.username : username, null, await global.configuration.getValue('fightmeTimeout'))
global.commons.sendMessage(global.translate('gambling.fightme.winner')
.replace(/\$winner/g, winner ? username : sender.username), sender)
global.db.engine.remove(`${self.collection}.fightme`, { _id: challenge._id.toString() })
Expand Down

0 comments on commit 9ec3fb4

Please sign in to comment.