Skip to content

Commit

Permalink
[V2 BetterMod] Fix critical bug not being able to look up clean users
Browse files Browse the repository at this point in the history
Merge of pull request #17 by @Kowlin
  • Loading branch information
Kowlin authored and laggron42 committed May 21, 2018
1 parent 1759800 commit f9d08b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bettermod/bettermod.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,9 +1308,6 @@ async def bcheck(self, ctx, user: discord.Member = None, case: int = 0):
await self.error(ctx)
return

if 'softban-warn' not in history[user.id]:
history[user.id]['softban-warn'] = 0

if user is None:
user = ctx.message.author
allowed = True
Expand Down Expand Up @@ -1343,6 +1340,9 @@ async def bcheck(self, ctx, user: discord.Member = None, case: int = 0):
await self.bot.say("You don't have any warning yet")
return

if 'softban-warn' not in history[user.id]:
history[user.id]['softban-warn'] = 0

if case < 0 or case > history[user.id]['total-warns']:
await self.bot.say("That case does not exist")
return
Expand Down

0 comments on commit f9d08b3

Please sign in to comment.