mirror of
https://github.com/danbulant/discord.js
synced 2026-09-18 05:54:20 +00:00
Attempt to fix the create command function
This commit is contained in:
parent
4f5cdf2814
commit
c513df444e
1 changed files with 4 additions and 4 deletions
|
|
@ -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<ApplicationCommand>} 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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue