aboutsummaryrefslogtreecommitdiff
path: root/discord/ext/commands/bot.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-04-06 21:45:16 -0400
committerRapptz <[email protected]>2020-04-06 21:45:16 -0400
commit874c2cd3c9ed47fa42eea184b167b8c0c64ea18e (patch)
treeda7a71227c4c39d90ae6c5a05c01e87cd62a0244 /discord/ext/commands/bot.py
parentMove log levels around to make INFO a little less noisy (diff)
downloaddiscord.py-874c2cd3c9ed47fa42eea184b167b8c0c64ea18e.tar.xz
discord.py-874c2cd3c9ed47fa42eea184b167b8c0c64ea18e.zip
[commands] Raise CheckFailure if all bot "check once" fail
Fix #2643
Diffstat (limited to 'discord/ext/commands/bot.py')
-rw-r--r--discord/ext/commands/bot.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index 9280136d..8485c4ab 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -890,6 +890,8 @@ class BotBase(GroupMixin):
try:
if await self.can_run(ctx, call_once=True):
await ctx.command.invoke(ctx)
+ else:
+ raise errors.CheckFailure('The global check once functions failed.')
except errors.CommandError as exc:
await ctx.command.dispatch_error(ctx, exc)
else: