Skip to content

Commit

Permalink
fix unban roulette
Browse files Browse the repository at this point in the history
  • Loading branch information
lluisd committed Oct 20, 2024
1 parent 0062129 commit f7e8a7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handlers/ban.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Ban {
}
}

async unbanRoulette(target, username, bot) {
async unbanRoulette(target, bot) {
const bans = await TwitchService.getBannedUsersCountByDate(moment().subtract(10, 'years').startOf('year').toDate())
if (bans) {
const randomBan = bans[Math.floor(Math.random() * bans.length)]
Expand Down
2 changes: 1 addition & 1 deletion lib/messenger.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class Messenger {
if (textSplit.length > 0 && inputParser.isAskingLastTimeouts(textSplit[0]) && (isAdmin(context) || isMod(context) || isBroadcaster(context)))
return handlers.ban.getTimeouts(target, this.bot)

if (textSplit.length > 0 && inputParser.isAskingUnbanRoulette(textSplit[0]) && (isAdmin(context) || isMod(context) || isBroadcaster(context)) && this._isNotCooldown('unbanRoulette',86400))
if (textSplit.length > 0 && inputParser.isAskingUnbanRoulette(textSplit[0]) && (isVip(context) || isAdmin(context) || isMod(context) || isBroadcaster(context)) && this._isNotCooldown('unbanRoulette',86400))
return handlers.ban.unbanRoulette(target, this.bot)

if (textSplit.length > 1 && inputParser.isAskingToTimeoutUser(textSplit[0]) && isAdmin(context))
Expand Down

0 comments on commit f7e8a7a

Please sign in to comment.