[Core] Send message on command cooldown (#611)

This commit is contained in:
PlanetTeamSpeak 2017-02-19 15:48:03 +01:00 committed by Twentysix
parent 08496d0793
commit e6fe686d1b

2
red.py
View File

@ -372,6 +372,8 @@ def initialize(bot_class=Bot, formatter_class=Formatter):
elif isinstance(error, commands.NoPrivateMessage): elif isinstance(error, commands.NoPrivateMessage):
await bot.send_message(channel, "That command is not " await bot.send_message(channel, "That command is not "
"available in DMs.") "available in DMs.")
elif isinstance(error, commands.CommandOnCooldown):
await bot.send_message(channel, error)
else: else:
bot.logger.exception(type(error).__name__, exc_info=error) bot.logger.exception(type(error).__name__, exc_info=error)