From 3c89fcf4638e57303419cba7db520e1a11fbf645 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Thu, 30 Sep 2021 16:18:06 -0700 Subject: [PATCH] [MassUnban] Skip empty ban reasons --- massunban/massunban.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/massunban/massunban.py b/massunban/massunban.py index 226abb7..bd4636b 100644 --- a/massunban/massunban.py +++ b/massunban/massunban.py @@ -66,6 +66,8 @@ class MassUnban(commands.Cog): return await ctx.send("Response timed out. Please run this command again if you wish to try again.") else: for ban_entry in banlist: + if not ban_entry.reason: + continue if ban_reason.lower() in ban_entry.reason.lower(): await ctx.guild.unban(ban_entry.user, reason=f"Mass Unban requested by {str(ctx.author)} ({ctx.author.id})") await asyncio.sleep(0.5)