docs: use remarks instead of Note in descriptions (#8597)

This commit is contained in:
Almeida
2022-09-05 17:14:19 +01:00
committed by GitHub
parent 4ffdada4f7
commit f3ce4a75d0
2 changed files with 14 additions and 10 deletions

View File

@@ -81,8 +81,8 @@ export class ContextMenuCommandBuilder {
/** /**
* Sets whether the command is enabled by default when the application is added to a guild. * 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 * @param value - Whether or not to enable this command by default
* @see https://discord.com/developers/docs/interactions/application-commands#permissions * @see https://discord.com/developers/docs/interactions/application-commands#permissions
* @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead. * @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. * 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 * @param permissions - The permissions bit field to set
* @see https://discord.com/developers/docs/interactions/application-commands#permissions * @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. * 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 { public toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody {
validateRequiredParameters(this.name, this.type); validateRequiredParameters(this.name, this.type);

View File

@@ -67,7 +67,9 @@ export class SlashCommandBuilder {
/** /**
* Returns the final data that should be sent to Discord. * 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 { public toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody {
validateRequiredParameters(this.name, this.description, this.options); 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. * 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 * @param value - Whether or not to enable this command by default
* @see https://discord.com/developers/docs/interactions/application-commands#permissions * @see https://discord.com/developers/docs/interactions/application-commands#permissions
* @deprecated Use {@link (SlashCommandBuilder:class).setDefaultMemberPermissions} or {@link (SlashCommandBuilder:class).setDMPermission} instead. * @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. * 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 * @param permissions - The permissions bit field to set
* @see https://discord.com/developers/docs/interactions/application-commands#permissions * @see https://discord.com/developers/docs/interactions/application-commands#permissions
*/ */