diff options
| author | Rapptz <[email protected]> | 2016-04-13 14:25:45 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-04-13 14:25:45 -0400 |
| commit | 054c9c71097389b92d9f0e9545ad3997a98d530d (patch) | |
| tree | 00405947e8eed0ced41fde08ef6e0396f5eab603 | |
| parent | Handle bot tag updates in GUILD_MEMBER_UPDATE. (diff) | |
| download | discord.py-054c9c71097389b92d9f0e9545ad3997a98d530d.tar.xz discord.py-054c9c71097389b92d9f0e9545ad3997a98d530d.zip | |
[commands] CommandError derived exceptions in checks don't crash help.
| -rw-r--r-- | discord/ext/commands/formatter.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/discord/ext/commands/formatter.py b/discord/ext/commands/formatter.py index 5240ffd2..2339a90f 100644 --- a/discord/ext/commands/formatter.py +++ b/discord/ext/commands/formatter.py @@ -28,6 +28,7 @@ import itertools import inspect from .core import GroupMixin, Command +from .errors import CommandError # help -> shows info of bot on top/bottom and lists subcommands # help command -> shows detailed info of command @@ -193,7 +194,10 @@ class HelpFormatter: # care about them, so just return true. return True - return cmd.can_run(self.context) + try: + return cmd.can_run(self.context) + except CommandError: + return False iterator = self.command.commands.items() if not self.is_cog() else self.context.bot.commands.items() return filter(predicate, iterator) |