diff options
author | 2019-02-15 21:31:46 +0200 | |
---|---|---|
committer | 2019-02-15 21:54:57 +0200 | |
commit | a4abf84de2bb1dd110bfcd751cc19523ccc0a3b7 (patch) | |
tree | d5fb3e0aacb85f012352001045beadf24ba1bb3d /bot/bot.py | |
parent | Merge pull request #117 from darthdelay/lovecalculator (diff) |
Refine love calculator command
Diffstat (limited to 'bot/bot.py')
-rw-r--r-- | bot/bot.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -5,6 +5,7 @@ from typing import List from aiohttp import AsyncResolver, ClientSession, TCPConnector from discord import Embed +from discord.ext import commands from discord.ext.commands import Bot from bot import constants @@ -61,3 +62,10 @@ class SeasonalBot(Bot): embed.set_author(name=title, icon_url=icon) await devlog.send(embed=embed) + + async def on_command_error(self, context, exception): + # Don't punish the user for getting the arguments wrong + if isinstance(exception, commands.UserInputError): + context.command.reset_cooldown(context) + else: + super().on_command_error(context, exception) |