From d515941ac0af2e176d186bed5d8fafb1cec13de4 Mon Sep 17 00:00:00 2001 From: scragly <29337040+scragly@users.noreply.github.com> Date: Thu, 5 Mar 2020 23:33:44 +1000 Subject: Raise BadArgument if no string match. --- bot/cogs/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot/cogs/utils.py b/bot/cogs/utils.py index 49fe6d344..8ea972145 100644 --- a/bot/cogs/utils.py +++ b/bot/cogs/utils.py @@ -250,6 +250,9 @@ class Utils(Cog): best_match = line match_index = index + if not best_match: + raise BadArgument("I didn't get a match! Please try again with a different search term.") + embed.title += f" (line {match_index}):" embed.description = best_match await ctx.send(embed=embed) -- cgit v1.2.3