diff options
| -rw-r--r-- | bot/converters.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/converters.py b/bot/converters.py index d0a9731d6..880b1fe38 100644 --- a/bot/converters.py +++ b/bot/converters.py @@ -575,7 +575,10 @@ class Infraction(Converter): return infractions[0] else: - return await ctx.bot.api_client.get(f"bot/infractions/{arg}") + try: + return await ctx.bot.api_client.get(f"bot/infractions/{arg}") + except ResponseCodeError: + raise BadArgument("The provided infraction could not be found.") Expiry = t.Union[Duration, ISODateTime] |