aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2019-02-17 21:39:08 +0100
committerGravatar GitHub <[email protected]>2019-02-17 21:39:08 +0100
commit8c235ddb85387b0cd5da7ce011c15ebe572e8efa (patch)
tree8a4235762e34872636a1e6453f0441a268a12439 /bot/bot.py
parentMerge pull request #111 from astieman/RollMethod (diff)
parentEscape markdown in usernames (diff)
Merge pull request #118 from avayert/master
Refine love calculator command
Diffstat (limited to 'bot/bot.py')
-rw-r--r--bot/bot.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 2df550dc..12291a5f 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -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)