Skip to content

Commit 6587657

Browse files
committed
Add no result for searchban.
1 parent 4c9cca7 commit 6587657

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mod/mod.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,9 @@ async def searchban(self, ctx, target):
527527
elif reason.find(target) != -1:
528528
results.append(ban)
529529
continue
530+
531+
if not results:
532+
return await ctx.send("No result!")
530533

531534
rendered_results = [str(i+1)+"/"+str(len(results))+"\nUser: "+v.user.name+"("+str(v.user.id)+")\nReason: "+v.reason for i,v in enumerate(results)]
532535
await menu(ctx, rendered_results, DEFAULT_CONTROLS)

0 commit comments

Comments
 (0)