docs: Correct wrong interaction links (#6274)

* docs: Correct wrong interaction links

* docs: fix errors and apply single option

* Update src/structures/CommandInteraction.js

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
Jiralite
2021-08-10 21:32:28 +01:00
committed by GitHub
parent 3c17939fd5
commit 49d3c0bf87
4 changed files with 16 additions and 8 deletions

View File

@@ -411,7 +411,8 @@ class ApplicationCommandPermissionsManager extends BaseManager {
module.exports = ApplicationCommandPermissionsManager; module.exports = ApplicationCommandPermissionsManager;
/* eslint-disable max-len */
/** /**
* @external APIApplicationCommandPermissions * @external APIApplicationCommandPermissions
* @see {@link https://discord.com/developers/docs/interactions/slash-commands#applicationcommandpermissions} * @see {@link https://discord.com/developers/docs/interactions/slash-commands#application-command-permissions-object-application-command-permissions-structure}
*/ */

View File

@@ -190,12 +190,14 @@ class ApplicationCommand extends Base {
module.exports = ApplicationCommand; module.exports = ApplicationCommand;
/* eslint-disable max-len */
/** /**
* @external APIApplicationCommand * @external APIApplicationCommand
* @see {@link https://discord.com/developers/docs/interactions/slash-commands#applicationcommand} * @see {@link https://discord.com/developers/docs/interactions/slash-commands#application-command-object-application-command-structure}
*/ */
/* eslint-disable max-len */
/** /**
* @external APIApplicationCommandOption * @external APIApplicationCommandOption
* @see {@link https://discord.com/developers/docs/interactions/slash-commands#applicationcommandoption} * @see {@link https://discord.com/developers/docs/interactions/slash-commands#application-command-object-application-command-option-structure}
*/ */

View File

@@ -92,8 +92,8 @@ class CommandInteraction extends Interaction {
* @property {CommandInteractionOption[]} [options] Additional options if this option is a * @property {CommandInteractionOption[]} [options] Additional options if this option is a
* subcommand (group) * subcommand (group)
* @property {User} [user] The resolved user * @property {User} [user] The resolved user
* @property {GuildMember|APIGuildMember} [member] The resolved member * @property {GuildMember|APIInteractionDataResolvedOption} [member] The resolved member
* @property {GuildChannel|APIChannel} [channel] The resolved channel * @property {GuildChannel|APIInteractionDataResolvedOption} [channel] The resolved channel
* @property {Role|APIRole} [role] The resolved role * @property {Role|APIRole} [role] The resolved role
*/ */
@@ -151,3 +151,8 @@ module.exports = CommandInteraction;
* @external APIApplicationCommandOptionResolved * @external APIApplicationCommandOptionResolved
* @see {@link https://discord.com/developers/docs/interactions/slash-commands#interaction-applicationcommandinteractiondataresolved} * @see {@link https://discord.com/developers/docs/interactions/slash-commands#interaction-applicationcommandinteractiondataresolved}
*/ */
/**
* @external APIInteractionDataResolvedOption
* @see {@link https://discord.com/developers/docs/interactions/slash-commands#sample-application-command-interaction-application-command-interaction-data-resolved-structure}
*/

View File

@@ -134,7 +134,7 @@ class CommandInteractionOptionResolver {
* Gets a channel option. * Gets a channel option.
* @param {string} name The name of the option. * @param {string} name The name of the option.
* @param {boolean} [required=false] Whether to throw an error if the option is not found. * @param {boolean} [required=false] Whether to throw an error if the option is not found.
* @returns {?(GuildChannel|APIInteractionDataResolvedChannel)} * @returns {?(GuildChannel|APIInteractionDataResolvedOption)}
* The value of the option, or null if not set and not required. * The value of the option, or null if not set and not required.
*/ */
getChannel(name, required = false) { getChannel(name, required = false) {
@@ -190,7 +190,7 @@ class CommandInteractionOptionResolver {
* Gets a member option. * Gets a member option.
* @param {string} name The name of the option. * @param {string} name The name of the option.
* @param {boolean} [required=false] Whether to throw an error if the option is not found. * @param {boolean} [required=false] Whether to throw an error if the option is not found.
* @returns {?(GuildMember|APIInteractionDataResolvedGuildMember)} * @returns {?(GuildMember|APIInteractionDataResolvedOption)}
* The value of the option, or null if not set and not required. * The value of the option, or null if not set and not required.
*/ */
getMember(name, required = false) { getMember(name, required = false) {
@@ -213,7 +213,7 @@ class CommandInteractionOptionResolver {
* Gets a mentionable option. * Gets a mentionable option.
* @param {string} name The name of the option. * @param {string} name The name of the option.
* @param {boolean} [required=false] Whether to throw an error if the option is not found. * @param {boolean} [required=false] Whether to throw an error if the option is not found.
* @returns {?(User|GuildMember|APIInteractionDataResolvedGuildMember|Role|APIRole)} * @returns {?(User|GuildMember|APIInteractionDataResolvedOption|Role|APIRole)}
* The value of the option, or null if not set and not required. * The value of the option, or null if not set and not required.
*/ */
getMentionable(name, required = false) { getMentionable(name, required = false) {