mirror of
https://github.com/discordjs/discord.js.git
synced 2026-05-24 20:40:07 +00:00
Compare commits
3 Commits
@discordjs
...
14.16.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a11ff75631 | ||
|
|
9257a09abb | ||
|
|
4810f7c863 |
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user