fix(Button + SelectMenu): wrong applicationId #222

This commit is contained in:
March 7th 2022-07-26 10:16:27 +07:00
parent 0a695d9edc
commit 136bf7ae50
4 changed files with 9 additions and 3 deletions

View File

@ -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.',

View File

@ -1016,7 +1016,7 @@ class Message extends Base {
}
/**
* Click specific button [Suggestion: Dux#2925]
* @param {string<Button.customId>} buttonID Button ID
* @param {string} buttonID Button ID
* @returns {Promise<InteractionResponseBody>}
*/
async clickButton(buttonID) {

View File

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

View File

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