fix(TextBasedChannel) sendSlash

#1234
#1214
This commit is contained in:
Elysia
2024-09-17 20:52:47 +07:00
parent 4e09cdf68c
commit f7e328e569

View File

@@ -192,13 +192,21 @@ class TextBasedChannel {
// API https://canary.discord.com/api/v9/guilds/:id/application-command-index // Guild
// https://canary.discord.com/api/v9/channels/:id/application-command-index // DM Channel
// Updated: 07/01/2023
return this.client.api[this.guild ? 'guilds' : 'channels'][this.guild?.id || this.id][
'application-command-index'
].get();
return this.client.api[this.guild ? 'guilds' : 'channels'][this.guild?.id || this.id]['application-command-index']
.get()
.catch(() => ({
application_commands: [],
applications: [],
version: '',
}));
}
searchInteractionUserApps() {
return this.client.api.users['@me']['application-command-index'].get();
return this.client.api.users['@me']['application-command-index'].get().catch(() => ({
application_commands: [],
applications: [],
version: '',
}));
}
searchInteraction() {