chore(release): version

This commit is contained in:
March 7th
2022-06-13 23:53:43 +07:00
parent bdc1c70758
commit dd2912fb8d
14 changed files with 245 additions and 31 deletions

View File

@@ -630,8 +630,26 @@ class ApplicationCommand extends Base {
if (subCommandCheck && subCommand?.options && subCommand?.options[i]?.required) {
throw new Error('Value required missing');
}
const data2 = {
type: 2, // Slash command, context menu
application_id: this.applicationId,
guild_id: message.guildId,
channel_id: message.channelId,
session_id: this.client.session_id,
data: {
// ApplicationCommandData
version: this.version,
id: this.id,
name: this.name,
guild_id: message.guildId,
type: ApplicationCommandTypes[this.type],
options: option_,
attachments: attachments,
},
nonce: SnowflakeUtil.generate(),
};
const data = {
type: 2, // ???
type: 2, // Slash command, context menu
application_id: this.applicationId,
guild_id: message.guildId,
channel_id: message.channelId,
@@ -647,12 +665,17 @@ class ApplicationCommand extends Base {
},
nonce: SnowflakeUtil.generate(),
};
console.log('Send', data);
await this.client.api.interactions.post({
body: data,
data,
files: attachmentsBuffer,
});
await this.client.api.interactions
.post({
body: data,
files: attachmentsBuffer,
})
.catch(async () => {
await this.client.api.interactions.post({
body: data2,
files: attachmentsBuffer,
});
});
return true;
}
/**