From f3ce4a75d0c4eafc89a1f0ce9f4964bcbcdae6da Mon Sep 17 00:00:00 2001 From: Almeida Date: Mon, 5 Sep 2022 17:14:19 +0100 Subject: [PATCH] docs: use remarks instead of `Note` in descriptions (#8597) --- .../contextMenuCommands/ContextMenuCommandBuilder.ts | 12 +++++++----- .../slashCommands/SlashCommandBuilder.ts | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts index 51003b251..ea94da034 100644 --- a/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts +++ b/packages/builders/src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts @@ -81,8 +81,8 @@ export class ContextMenuCommandBuilder { /** * Sets whether the command is enabled by default when the application is added to a guild. * - * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command. - * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. * @param value - Whether or not to enable this command by default * @see https://discord.com/developers/docs/interactions/application-commands#permissions * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. @@ -99,8 +99,8 @@ export class ContextMenuCommandBuilder { /** * Sets the default permissions a member should have in order to run the command. * - * **Note:** You can set this to `'0'` to disable the command by default. - * + * @remarks + * You can set this to `'0'` to disable the command by default. * @param permissions - The permissions bit field to set * @see https://discord.com/developers/docs/interactions/application-commands#permissions */ @@ -174,7 +174,9 @@ export class ContextMenuCommandBuilder { /** * Returns the final data that should be sent to Discord. * - * **Note:** Calling this function will validate required properties based on their conditions. + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. */ public toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody { validateRequiredParameters(this.name, this.type); diff --git a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts index c7b88d094..c7b5a76c3 100644 --- a/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts +++ b/packages/builders/src/interactions/slashCommands/SlashCommandBuilder.ts @@ -67,7 +67,9 @@ export class SlashCommandBuilder { /** * Returns the final data that should be sent to Discord. * - * **Note:** Calling this function will validate required properties based on their conditions. + * @remarks + * This method runs validations on the data before serializing it. + * As such, it may throw an error if the data is invalid. */ public toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody { validateRequiredParameters(this.name, this.description, this.options); @@ -84,8 +86,8 @@ export class SlashCommandBuilder { /** * Sets whether the command is enabled by default when the application is added to a guild. * - * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command. - * + * @remarks + * If set to `false`, you will have to later `PUT` the permissions for this command. * @param value - Whether or not to enable this command by default * @see https://discord.com/developers/docs/interactions/application-commands#permissions * @deprecated Use {@link (SlashCommandBuilder:class).setDefaultMemberPermissions} or {@link (SlashCommandBuilder:class).setDMPermission} instead. @@ -102,8 +104,8 @@ export class SlashCommandBuilder { /** * Sets the default permissions a member should have in order to run the command. * - * **Note:** You can set this to `'0'` to disable the command by default. - * + * @remarks + * You can set this to `'0'` to disable the command by default. * @param permissions - The permissions bit field to set * @see https://discord.com/developers/docs/interactions/application-commands#permissions */