Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class MissingRequiredArgument(CommandError):
"""Exception raised when a required argument is not passed to a command.
Attributes
----------
param: :class:`inspect.Parameter`
The argument that is missing.
"""
def __init__(self, param):
self.param = param
super().__init__(f'{param.name} is a required argument that is missing.')
class BadArgument(CommandError):
"""Exception raised when a bad argument is passed to a command."""
class CommandError(TwitchIOBException):
"""Base Exception for errors raised by commands."""
pass
class CommandNotFound(CommandError):
"""Exception raised when a command is not found."""
pass
class CheckFailure(CommandError):
"""Exception raised when a check fails."""
class MissingRequiredArgument(CommandError):
"""Exception raised when a required argument is not passed to a command.
Attributes
----------
param: :class:`inspect.Parameter`
The argument that is missing.
"""
def __init__(self, param):
self.param = param
super().__init__(f'{param.name} is a required argument that is missing.')
class BadArgument(CommandError):
"""Exception raised when a bad argument is passed to a command."""
from twitchio.errors import TwitchIOBException
class CommandError(TwitchIOBException):
"""Base Exception for errors raised by commands."""
pass
class CommandNotFound(CommandError):
"""Exception raised when a command is not found."""
pass
class CheckFailure(CommandError):
"""Exception raised when a check fails."""
class MissingRequiredArgument(CommandError):
"""Exception raised when a required argument is not passed to a command.
Attributes
----------
param: :class:`inspect.Parameter`
The argument that is missing.
"""
def __init__(self, param):
self.param = param
super().__init__(f'{param.name} is a required argument that is missing.')
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
__all__ = ('CommandError', 'CommandNotFound', 'MissingRequiredArgument', 'BadArgument', 'CheckFailure',)
from twitchio.errors import TwitchIOBException
class CommandError(TwitchIOBException):
"""Base Exception for errors raised by commands."""
pass
class CommandNotFound(CommandError):
"""Exception raised when a command is not found."""
pass
class CheckFailure(CommandError):
"""Exception raised when a check fails."""
class MissingRequiredArgument(CommandError):
"""Exception raised when a required argument is not passed to a command.
Attributes
----------
param: :class:`inspect.Parameter`
The argument that is missing.
"""