Files
payphone/payphone/core/exceptions.py
T
2024-10-16 13:21:04 -03:00

22 lines
642 B
Python

from discord.ext.commands import errors
class ChannelDisabledError(errors.CheckFailure):
"""Raised when the channel being run the command in is disabled."""
class NotAModeratorError(errors.CheckFailure):
"""Raised when a non-moderator tries to run a moderator-only command."""
class InvalidTimedeltaError(Exception):
"""Raised when the passed timedelta string cannot be parsed by the converter."""
class BannedError(errors.CheckFailure):
"""Raised when the user running the command is banned."""
class NotOnCallError(errors.CheckFailure):
"""Raised when the command is ran in a channel with no ongoing calls."""