Skip to content

Commit

Permalink
Fixed slash command docs
Browse files Browse the repository at this point in the history
  • Loading branch information
JustCat80 committed Jul 4, 2021
1 parent 0b0ca56 commit 0c6b60a
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class Client extends EventEmitter {
* @arg {String} command.description The command description
* @arg {String} [command.options] The parameters for the command
* @arg {Boolean} [defaultPermission] Whether the command is enabled by default when the app is added to a guild
* @returns {Promise<Object>} Resolves with a webhook object
* @returns {Promise<Object>} Resolves with a commands object
*/
createCommand(command) {
if(!command.name || !command.description) {
Expand All @@ -506,7 +506,7 @@ class Client extends EventEmitter {
* @arg {String} commands.command.description The command description
* @arg {String} [commands.command.options] The parameters for the command
* @arg {Boolean} [commands.defaultPermission] Whether the command is enabled by default when the app is added to a guild
* @returns {Promise<Object>} Resolves with a webhook object
* @returns {Promise<Array>} Resolves with an array of commands objects
*/
createCommands(commands) {
for(const command in commands) {
Expand Down Expand Up @@ -577,7 +577,7 @@ class Client extends EventEmitter {
* @arg {String} command.description The command description
* @arg {String} [command.options] The parameters for the command
* @arg {Boolean} [defaultPermission] Whether the command is enabled by default when the app is added to a guild
* @returns {Promise<Object>} Resolves with a webhook object
* @returns {Promise<Object>} Resolves with a commands object
*/
createGuildCommand(guildID, command) {
if(!command.name || !command.description) {
Expand All @@ -599,7 +599,7 @@ class Client extends EventEmitter {
* @arg {String} commands.command.description The command description
* @arg {String} [commands.command.options] The parameters for the command
* @arg {Boolean} [commands.defaultPermission] Whether the command is enabled by default when the app is added to a guild
* @returns {Promise<Object>} Resolves with a webhook object
* @returns {Promise<Object>} Resolves with an array of commands objects
*/
createGuildCommands(guildID, commands) {
for(const command in commands) {
Expand All @@ -614,7 +614,6 @@ class Client extends EventEmitter {
return this.requestHandler.request("PUT", Endpoints.GUILD_COMMANDS(this.application.id, guildID), true, commands);
}


/**
* Create a guild emoji object
* @arg {String} guildID The ID of the guild to create the emoji in
Expand Down Expand Up @@ -790,7 +789,7 @@ class Client extends EventEmitter {
/**
* Delete a global slash command
* @arg {String} commandID The command id
* @returns {Promise} Resolves with a webhook object
* @returns {Promise} Resolves with a promise object
*/
deleteCommand(commandID) {
if(!commandID) {
Expand All @@ -812,7 +811,7 @@ class Client extends EventEmitter {
* Delete a global slash command
* @arg {String} guildID The guild id
* @arg {String} commandID The command id
* @returns {Promise} Resolves with a webhook object
* @returns {Promise} Resolves with a promise object
*/
deleteGuildCommand(guildID, commandID) {
if(!guildID) {
Expand Down Expand Up @@ -1130,7 +1129,7 @@ class Client extends EventEmitter {
* @arg {String} [command.description] The command description
* @arg {String} [command.options] The parameters for the command
* @arg {Boolean} [defaultPermission] Whether the command is enabled by default when the app is added to a guild
* @returns {Promise<Object>} Resolves with a webhook object
* @returns {Promise<Object>} Resolves with a commands object
*/
editCommand(commandID, command) {
if(!commandID) {
Expand Down Expand Up @@ -1203,7 +1202,7 @@ class Client extends EventEmitter {
* @arg {String} [command.description] The command description
* @arg {String} [command.options] The parameters for the command
* @arg {Boolean} [defaultPermission] Whether the command is enabled by default when the app is added to a guild
* @returns {Promise<Object>} Resolves with a webhook object
* @returns {Promise<Object>} Resolves with a commands object
*/
editGuildCommand(guildID, commandID, command) {
if(!commandID) {
Expand Down

0 comments on commit 0c6b60a

Please sign in to comment.