Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/discord.js/src/client/actions/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ class GenericAction {
getThreadMember(id, manager) {
return this.getPayload({ user_id: id }, manager, id, Partials.ThreadMember, false);
}

spreadInjectedData(data) {
const ret = {};

for (const symbol of Object.getOwnPropertySymbols(data)) {
ret[symbol] = data[symbol];
}

return ret;
}
}

module.exports = GenericAction;
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ class MessageReactionAdd extends Action {
if (!user) return false;

// Verify channel
const channel = this.getChannel({ id: data.channel_id, guild_id: data.guild_id, user_id: data.user_id });
const channel = this.getChannel({
id: data.channel_id,
guild_id: data.guild_id,
user_id: data.user_id,
...this.spreadInjectedData(data),
});

if (!channel?.isTextBased()) return false;

// Verify message
Expand Down