From 8b7a56211193c2cae6ca0dc9eefb0a9000566a0f Mon Sep 17 00:00:00 2001 From: RGBCube <78925721+RGBCube@users.noreply.github.com> Date: Mon, 6 Jun 2022 09:30:28 +0000 Subject: [PATCH] add error handling for invalid channels --- cogs/error_handler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cogs/error_handler.py b/cogs/error_handler.py index 619a605..5d0941c 100644 --- a/cogs/error_handler.py +++ b/cogs/error_handler.py @@ -42,6 +42,9 @@ class ErrorHandler(commands.Cog): elif isinstance(error, commands.MissingPermissions): await ctx.reply("You can't use this command!") + elif isinstance(error, commands.ChannelNotFound): + await ctx.reply("Invalid channel.") + else: trace = traceback.format_exception( type(error), error, error.__traceback__