Skip to content

Commit 4c9cca7

Browse files
committed
Add reason check for searchban.
1 parent 7a447c0 commit 4c9cca7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mod/mod.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,10 @@ async def searchban(self, ctx, target):
514514
for ban in bans:
515515
user_id = str(ban.user.id).lower()
516516
name = ban.user.name.lower()
517-
reason = ban.reason.lower()
517+
if ban.reason:
518+
reason = ban.reason.lower()
519+
else:
520+
reason = "None"
518521
if user_id.find(target) != -1:
519522
results.append(ban)
520523
continue

0 commit comments

Comments
 (0)