diff --git a/cogs/emote.py b/cogs/emote.py index f40b939..b6a6310 100644 --- a/cogs/emote.py +++ b/cogs/emote.py @@ -106,6 +106,15 @@ class Emotes(commands.Cog): return True + @commands.Cog.listener() + async def on_command_error(self, context, error): + if isinstance(error, errors.EmoteManagerError): + await context.send(str(error)) + + if isinstance(error, commands.NoPrivateMessage): + await context.send( + f'{utils.SUCCESS_EMOJIS[False]} Sorry, this command may only be used in a server.') + @commands.command(usage='[name] ') async def add(self, context, *args): """Add a new emote to this server.