Compare commits

...

3 Commits

Author SHA1 Message Date
Vlad Frangu
a11ff75631 chore(discord.js): release discord.js@14.16.1 (#10476) 2024-09-03 00:24:53 +03:00
Vlad Frangu
9257a09abb fix(Message): reacting returning undefined (#10475) 2024-09-03 00:20:16 +03:00
space
4810f7c863 fix(Transformers): pass client to recursive call (#10474) 2024-09-02 21:12:28 +00:00
5 changed files with 20 additions and 3 deletions

View File

@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
# [14.16.1](https://github.com/discordjs/discord.js/compare/14.16.0...14.16.1) - (2024-09-02)
## Bug Fixes
- **Message:** Reacting returning undefined (#10475) ([9257a09](https://github.com/discordjs/discord.js/commit/9257a09abbf80558ed2d5d209a2f6bd2a4b3d799)) by @vladfrangu
- **Transformers:** Pass client to recursive call (#10474) ([4810f7c](https://github.com/discordjs/discord.js/commit/4810f7c8637dacf77d0442bd84e0d579e1f1d3bd)) by @SpaceEEC
# [14.16.0](https://github.com/discordjs/discord.js/compare/14.15.3...14.16.0) - (2024-09-01)
## Bug Fixes

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "discord.js",
"version": "14.16.0",
"version": "14.16.1",
"description": "A powerful library for interacting with the Discord API",
"scripts": {
"test": "pnpm run docs:test && pnpm run test:typescript",

View File

@@ -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;

View File

@@ -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

View File

@@ -49,7 +49,7 @@ function _transformAPIMessageInteractionMetadata(client, messageInteractionMetad
originalResponseMessageId: messageInteractionMetadata.original_response_message_id ?? null,
interactedMessageId: messageInteractionMetadata.interacted_message_id ?? null,
triggeringInteractionMetadata: messageInteractionMetadata.triggering_interaction_metadata
? _transformAPIMessageInteractionMetadata(messageInteractionMetadata.triggering_interaction_metadata)
? _transformAPIMessageInteractionMetadata(client, messageInteractionMetadata.triggering_interaction_metadata)
: null,
};
}