mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
fix(Message): reacting returning undefined (#10475)
This commit is contained in:
@@ -111,6 +111,10 @@ class GenericAction {
|
|||||||
getThreadMember(id, manager) {
|
getThreadMember(id, manager) {
|
||||||
return this.getPayload({ user_id: id }, manager, id, Partials.ThreadMember, false);
|
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;
|
module.exports = GenericAction;
|
||||||
|
|||||||
@@ -23,7 +23,13 @@ class MessageReactionAdd extends Action {
|
|||||||
if (!user) return false;
|
if (!user) return false;
|
||||||
|
|
||||||
// Verify channel
|
// 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;
|
if (!channel?.isTextBased()) return false;
|
||||||
|
|
||||||
// Verify message
|
// Verify message
|
||||||
|
|||||||
Reference in New Issue
Block a user