# Path: scripts/checks.py
# class AdminError(CommandError):
#     pass
# 
# class ManageMessageError(CommandError):
#     pass
# 
# class ManageRoleError(CommandError):
#     pass
# 
# class NsfwError(CommandError):
#     pass


from discord.ext.commands import BadArgument, CommandOnCooldown, Context, \
    NoPrivateMessage, NotOwner
from scripts.checks import AdminError, ManageMessageError, \
    ManageRoleError, NsfwError



def command_error_handler(exception):
    """
    A function that handles command errors
    :param exception: the exception raised
    :return: the message to be sent based on the exception type
    """
    checked = (CommandOnCooldown, NsfwError, ManageMessageError, BadArgument,

# Path: scripts/checks.py
# class AdminError(CommandError):
#     pass
# 
# class ManageMessageError(CommandError):
#     pass
# 
# class ManageRoleError(CommandError):
#     pass
# 
# class NsfwError(CommandError):
#     pass


# Path: bot/error_handler.py
from discord.ext.commands import BadArgument, CommandOnCooldown, Context, \
    NoPrivateMessage, NotOwner
from scripts.checks import AdminError, ManageMessageError, \
    ManageRoleError, NsfwError




def command_error_handler(exception):
    """
    A function that handles command errors
    :param exception: the exception raised
    :return: the message to be sent based on the exception type
    """
    checked = (CommandOnCooldown, NsfwError, ManageMessageError, BadArgument,

               ManageRoleError, AdminError, NoPrivateMessage, NotOwner)