aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2017-06-13 23:51:11 -0400
committerRapptz <[email protected]>2017-06-13 23:51:11 -0400
commite62e2c7cc6f8727130105f8ee68eceeb877f88e9 (patch)
treed09e5fa83fa80e3b3bd910b2692d5f5e2ad6338c
parent[commands] Don't display default error handler if a cog local exists. (diff)
downloaddiscord.py-e62e2c7cc6f8727130105f8ee68eceeb877f88e9.tar.xz
discord.py-e62e2c7cc6f8727130105f8ee68eceeb877f88e9.zip
[commands] Fix cog error detection in the default global error handler.
-rw-r--r--discord/ext/commands/bot.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index 0f7d8a76..f5218659 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -206,7 +206,7 @@ class BotBase(GroupMixin):
cog = context.cog
if cog:
- attr = '__{0.__class__.__name__}_error'.format(cog)
+ attr = '_{0.__class__.__name__}__error'.format(cog)
if hasattr(cog, attr):
return