[commands] Add is_owner check and Bot.is_owner.
This commit is contained in:
@ -29,7 +29,7 @@ from discord.errors import DiscordException
|
||||
__all__ = [ 'CommandError', 'MissingRequiredArgument', 'BadArgument',
|
||||
'NoPrivateMessage', 'CheckFailure', 'CommandNotFound',
|
||||
'DisabledCommand', 'CommandInvokeError', 'TooManyArguments',
|
||||
'UserInputError', 'CommandOnCooldown' ]
|
||||
'UserInputError', 'CommandOnCooldown', 'NotOwner' ]
|
||||
|
||||
class CommandError(DiscordException):
|
||||
"""The base exception type for all command related errors.
|
||||
@ -100,6 +100,10 @@ class NoPrivateMessage(CheckFailure):
|
||||
"""
|
||||
pass
|
||||
|
||||
class NotOwner(CheckFailure):
|
||||
"""Exception raised when the message author is not the owner of the bot."""
|
||||
pass
|
||||
|
||||
class DisabledCommand(CommandError):
|
||||
"""Exception raised when the command being invoked is disabled."""
|
||||
pass
|
||||
|
Reference in New Issue
Block a user