ignore discord.errors.forbidden in on_message event
@@ -51,6 +51,7 @@ class Events(commands.Cog):
self.d.msg_count += 1
+ try:
if m.content.startswith(f'<@!{self.bot.user.id}>'):
prefix = '/'
if m.guild is not None:
@@ -82,6 +83,8 @@ class Events(commands.Cog):
await m.channel.send('awww{} man'.format(random.randint(1, 5)*'w'))
elif 'reee' in m.content.lower():
await m.channel.send(random.choice(self.d.emojis.reees))
+ except discord.errors.Forbidden:
+ pass
async def debug_error(self, ctx, e):
traceback_text = ''.join(traceback.format_exception(type(e), e, e.__traceback__, 4))
