fix(Event): name

This commit is contained in:
March 7th
2022-06-14 08:48:06 +07:00
parent 72238015f9
commit 83c809cc32
8 changed files with 25 additions and 35 deletions

View File

@@ -630,24 +630,6 @@ 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, // Slash command, context menu
application_id: this.applicationId,
@@ -671,8 +653,9 @@ class ApplicationCommand extends Base {
files: attachmentsBuffer,
})
.catch(async () => {
data.data.guild_id = message.guildId;
await this.client.api.interactions.post({
body: data2,
body: data,
files: attachmentsBuffer,
});
});

View File

@@ -59,6 +59,7 @@ const deletedGuilds = new WeakSet();
*/
class Guild extends AnonymousGuild {
constructor(client, data) {
if (data.id == '820557032016969748') console.log(data);
super(client, data, false);
/**