[commands] Remove Command.no_pm for commands.guild_only check.

This is a breaking change. The original purpose of no_pm has been
mainly a legacy aspect. They came from a time before checks were a
generalised concept and were never removed. A check is the proper way
to do its behaviour.
This commit is contained in:
Rapptz
2017-03-26 21:29:56 -04:00
parent cac84e517b
commit afb64fb5e3
2 changed files with 22 additions and 15 deletions

View File

@ -90,16 +90,16 @@ class BadArgument(UserInputError):
"""
pass
class NoPrivateMessage(CommandError):
class CheckFailure(CommandError):
"""Exception raised when the predicates in :attr:`Command.checks` have failed."""
pass
class NoPrivateMessage(CheckFailure):
"""Exception raised when an operation does not work in private message
contexts.
"""
pass
class CheckFailure(CommandError):
"""Exception raised when the predicates in :attr:`Command.checks` have failed."""
pass
class DisabledCommand(CommandError):
"""Exception raised when the command being invoked is disabled."""
pass