matnad/pollmaster

Forbidden stacktrace when getting info in DM

Gillingham opened this issue · 1 comments

Steps to reproduce.

  1. Create a poll, I'm not sure it matters but the one I created as anonymous.
  2. DM the bot pm!show <poll>
  3. Click the info ? on the bots response.
  4. You correctly get the info for the poll, but it also causes the below stacktrace.
Task exception was never retrieved
1|pollmaster  | future: <Task finished coro=<Message.remove_reaction() done, defined at /home/.../.pyenv/versions/3.7.4/lib/python3.7/site-packages/discord/message.py:826> exception=Forbidden('403 FORBIDDEN (error code: 50003): Cannot execute action on a DM channel')>
1|pollmaster  | Traceback (most recent call last):
1|pollmaster  |   File "/home/.../.pyenv/versions/3.7.4/lib/python3.7/site-packages/discord/message.py", line 863, in remove_reaction
1|pollmaster  |     await self._state.http.remove_reaction(self.channel.id, self.id, emoji, member.id)
1|pollmaster  |   File "/home/.../.pyenv/versions/3.7.4/lib/python3.7/site-packages/discord/http.py", line 218, in request
1|pollmaster  |     raise Forbidden(r, data)
1|pollmaster  | discord.errors.Forbidden: 403 FORBIDDEN (error code: 50003): Cannot execute action on a DM channel

That is caused because the bot cant remove user reactions in DM channels.
I will fix it with the next release, but this is nothing to worry about, you can just ignore the errors.