mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
docs(*): add links to Discord's API objects & data (#5862)
This commit is contained in:
@@ -206,13 +206,13 @@ class ApplicationCommand extends Base {
|
||||
* Transforms an {@link ApplicationCommandOptionData} object into something that can be used with the API.
|
||||
* @param {ApplicationCommandOptionData} option The option to transform
|
||||
* @param {boolean} [received] Whether this option has been received from Discord
|
||||
* @returns {Object}
|
||||
* @returns {APIApplicationCommandOption}
|
||||
* @private
|
||||
*/
|
||||
static transformOption(option, received) {
|
||||
const stringType = typeof option.type === 'string' ? option.type : ApplicationCommandOptionTypes[option.type];
|
||||
return {
|
||||
type: typeof option.type === 'number' && !received ? option.type : ApplicationCommandOptionTypes[option.type],
|
||||
type: typeof option.type === 'number' && !received ? option.type : stringType,
|
||||
name: option.name,
|
||||
description: option.description,
|
||||
required:
|
||||
@@ -224,3 +224,13 @@ class ApplicationCommand extends Base {
|
||||
}
|
||||
|
||||
module.exports = ApplicationCommand;
|
||||
|
||||
/**
|
||||
* @external APIApplicationCommand
|
||||
* @see {@link https://discord.com/developers/docs/interactions/slash-commands#applicationcommand}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external APIApplicationCommandOption
|
||||
* @see {@link https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoption}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user