diff --git a/src/client/Client.js b/src/client/Client.js index 5e46967..0f3a443 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -224,6 +224,12 @@ class Client extends BaseClient { */ this.usedCodes = []; + /** + * Session ID + * @type {?string} + */ + this.session_id = null; + if (this.options.messageSweepInterval > 0) { process.emitWarning( 'The message sweeping client options are deprecated, use the global sweepers instead.', diff --git a/src/structures/Message.js b/src/structures/Message.js index 4a29ab6..a66da33 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1016,7 +1016,7 @@ class Message extends Base { } /** * Click specific button [Suggestion: Dux#2925] - * @param {string} buttonID Button ID + * @param {string} buttonID Button ID * @returns {Promise} */ async clickButton(buttonID) { diff --git a/src/structures/MessageButton.js b/src/structures/MessageButton.js index 5f56ed6..5b2f3db 100644 --- a/src/structures/MessageButton.js +++ b/src/structures/MessageButton.js @@ -180,7 +180,7 @@ class MessageButton extends BaseMessageComponent { guild_id: message.guild?.id ?? null, // In DMs channel_id: message.channel.id, message_id: message.id, - application_id: message.author.id, + application_id: message.applicationId ?? message.author.id, session_id: message.client.session_id, message_flags: message.flags.bitfield, data: { diff --git a/src/structures/MessageSelectMenu.js b/src/structures/MessageSelectMenu.js index 3e329b9..084fb3d 100644 --- a/src/structures/MessageSelectMenu.js +++ b/src/structures/MessageSelectMenu.js @@ -248,7 +248,7 @@ class MessageSelectMenu extends BaseMessageComponent { guild_id: message.guild?.id ?? null, // In DMs channel_id: message.channel.id, message_id: message.id, - application_id: message.author.id, + application_id: message.applicationId ?? message.author.id, session_id: message.client.session_id, message_flags: message.flags.bitfield, data: {