[commands] Fix cog error detection in the default global error handler.

This commit is contained in:
Rapptz 2017-06-13 23:51:11 -04:00
parent 7d6435fa9c
commit e62e2c7cc6

View File

@ -206,7 +206,7 @@ class BotBase(GroupMixin):
cog = context.cog cog = context.cog
if cog: if cog:
attr = '__{0.__class__.__name__}_error'.format(cog) attr = '_{0.__class__.__name__}__error'.format(cog)
if hasattr(cog, attr): if hasattr(cog, attr):
return return