diff options
| author | 2020-03-05 23:33:44 +1000 | |
|---|---|---|
| committer | 2020-03-05 23:33:44 +1000 | |
| commit | d515941ac0af2e176d186bed5d8fafb1cec13de4 (patch) | |
| tree | 9c6d0c6af7564856579af04763d18d552247a02a | |
| parent | Re-use embed, use command converter, raise BadArgument. (diff) | |
Raise BadArgument if no string match.
| -rw-r--r-- | bot/cogs/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |