Skip to content

Commit

Permalink
BUGFIX:
Browse files Browse the repository at this point in the history
- reason might be empty
  • Loading branch information
karel26 committed Feb 7, 2023
1 parent 2bf9a70 commit 4c99461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/bans.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def cloud_bans(self):
for guild in self.bot.guilds:
try:
guild_bans = [entry async for entry in guild.bans()]
banned_users = [x.user for x in guild_bans if x.reason.startswith('DGSA:')]
banned_users = [x.user for x in guild_bans if x.reason and x.reason.startswith('DGSA:')]
# unban users that should not be banned anymore
for user in [x for x in banned_users if x not in users_to_ban]:
await guild.unban(user, reason='DGSA: ban revoked.')
Expand Down

0 comments on commit 4c99461

Please sign in to comment.