1
Fork 0
mirror of https://github.com/RGBCube/minearchy-bot synced 2025-07-27 17:07:45 +00:00

add error handling for invalid channels

This commit is contained in:
RGBCube 2022-06-06 09:30:28 +00:00
parent eca97106f6
commit 8b7a562111

View file

@ -42,6 +42,9 @@ class ErrorHandler(commands.Cog):
elif isinstance(error, commands.MissingPermissions): elif isinstance(error, commands.MissingPermissions):
await ctx.reply("You can't use this command!") await ctx.reply("You can't use this command!")
elif isinstance(error, commands.ChannelNotFound):
await ctx.reply("Invalid channel.")
else: else:
trace = traceback.format_exception( trace = traceback.format_exception(
type(error), error, error.__traceback__ type(error), error, error.__traceback__