Skip to content

Suppress NotFound exception when removing reactions for help command #1050

@MarkKoz

Description

@MarkKoz

Sentry Issue: BOT-6X

TimeoutError: 
  File "bot/cogs/help.py", line 40, in help_cleanup
    await bot.wait_for("reaction_add", check=check, timeout=300)
  File "asyncio/tasks.py", line 490, in wait_for
    raise exceptions.TimeoutError()

NotFound: 404 Not Found (error code: 10008): Unknown Message
(3 additional frame(s) were not displayed)
...
  File "discord/ext/commands/help.py", line 817, in command_callback
    return await self.send_command_help(cmd)
  File "bot/cogs/help.py", line 203, in send_command_help
    await help_cleanup(self.context.bot, self.context.author, message)
  File "bot/cogs/help.py", line 43, in help_cleanup
    await message.remove_reaction(DELETE_EMOJI, bot.user)
  File "discord/message.py", line 982, in remove_reaction
    await self._state.http.remove_own_reaction(self.channel.id, self.id, emoji)
  File "discord/http.py", line 223, in request
    raise NotFound(r, data)

Error executing command invoked by <REDACTED>: !help purge user

Metadata

Metadata

Assignees

Labels

a: informationRelated to information commands: (doc, help, information, reddit, site, tags)p: 3 - lowLow Priorityt: bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions