diff --git a/src/client/InteractionClient.js b/src/client/InteractionClient.js index 631c5895..0bc80f51 100644 --- a/src/client/InteractionClient.js +++ b/src/client/InteractionClient.js @@ -76,14 +76,14 @@ class InteractionClient extends BaseClient { * Create a command. * @param {Object} command The command description. * @param {Snowflake?} guildID Optional guild ID. - * @returns {ApplicationCommand} The created command. + * @returns {Promise} The created command. */ - createCommand(command, guildID) { - let path = this.client.api.applications('@me'); + async createCommand(command, guildID) { + let path = this.client.api.applications(this.client.user.id); if (guildID) { path = path.guilds(guildID); } - const c = path.commands.post({ + const c = await path.commands.post({ data: { name: command.name, description: command.description,