From 6d790fdbfea2909233b2ecfa79f579ef338d9f8e Mon Sep 17 00:00:00 2001 From: Myned Date: Wed, 8 Nov 2017 22:32:06 -0500 Subject: [PATCH] Added temp silencing of discord NotFound errors --- src/main/run.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/run.py b/src/main/run.py index fcbe5ae..ecfc2b8 100644 --- a/src/main/run.py +++ b/src/main/run.py @@ -9,6 +9,7 @@ from contextlib import suppress from pprint import pprint import discord as d +from discord import errors as err from discord import utils from discord.ext import commands from discord.ext.commands import errors as errext @@ -86,8 +87,10 @@ async def on_error(error, *args, **kwargs): @bot.event async def on_command_error(ctx, error): - if isinstance(error, errext.CheckFailure): - await ctx.send('\N{NO ENTRY} **Insufficient permissions**', delete_after=10) + if isinstance(error, err.NotFound): + pass + elif isinstance(error, errext.CheckFailure): + await ctx.send('**Insufficient permissions**', delete_after=10) await ctx.message.add_reaction('\N{NO ENTRY}') elif isinstance(error, errext.CommandNotFound): print('INVALID COMMAND : {}'.format(error), file=sys.stderr)