mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(Message): reacting returning undefined (#10475)
This commit is contained in:
@@ -111,6 +111,10 @@ class GenericAction {
|
||||
getThreadMember(id, manager) {
|
||||
return this.getPayload({ user_id: id }, manager, id, Partials.ThreadMember, false);
|
||||
}
|
||||
|
||||
spreadInjectedData(data) {
|
||||
return Object.fromEntries(Object.getOwnPropertySymbols(data).map(symbol => [symbol, data[symbol]]));
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = GenericAction;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user