You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.
The ReactionHandler does not check for DM messages (!message.guild) so it will attempt to "execute action on a DM channel", (remove reactions and messages).
Code or steps to reproduce
Attempt to use a ReactionHandler or RichDisplay in DM channel
Expected and actual behavior
You'd expect the handler to perform worse than usual, since reactions have to be pressed twice, but not produce any obvious error.
Instead an error is produced:
Uncaught Promise Error:
DiscordAPIError: Cannot execute action on a DM channel
at RequestHandler.execute (node_modules\discord.js\src\rest\RequestHandler.js:170:25)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Further details
It's an easy fix however I'm not really familiar with git enough to commit a change 😅 simply check for a guild existing in the message object wherever actions are committed and do not perform them
@klasa/core version: 0.5.0
node.js version: 12.18.1
Klasa version: 0.5.0
I have modified core files.
I have tested the issue on latest master. Commit hash:
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the issue
The ReactionHandler does not check for DM messages (!message.guild) so it will attempt to "execute action on a DM channel", (remove reactions and messages).
Code or steps to reproduce
Attempt to use a ReactionHandler or RichDisplay in DM channel
Expected and actual behavior
You'd expect the handler to perform worse than usual, since reactions have to be pressed twice, but not produce any obvious error.
Instead an error is produced:
Uncaught Promise Error:
DiscordAPIError: Cannot execute action on a DM channel
at RequestHandler.execute (node_modules\discord.js\src\rest\RequestHandler.js:170:25)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Further details
It's an easy fix however I'm not really familiar with git enough to commit a change 😅 simply check for a guild existing in the message object wherever actions are committed and do not perform them
The text was updated successfully, but these errors were encountered: