docs: remove duplication in descriptions (#1225)

This commit is contained in:
Danial Raza
2025-05-07 18:24:54 +02:00
committed by GitHub
parent 6437928821
commit 5049f81b39
30 changed files with 130 additions and 74 deletions

View File

@@ -95,15 +95,21 @@ export interface APIApplicationCommand {
*/
default_permission?: boolean;
/**
* Indicates whether the command is age-restricted, defaults to `false`
* Indicates whether the command is age-restricted
*
* @defaultValue `false`
*/
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
* Installation context(s) where the command is available, only for globally-scoped commands
*
* @defaultValue `[ApplicationIntegrationType.GuildInstall]`
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
* Interaction context(s) where the command can be used, only for globally-scoped commands
*
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
*/
contexts?: InteractionContextType[] | null;
/**

View File

@@ -363,7 +363,9 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
* The default layout type used to display posts in a forum channel
*
* @defaultValue `ForumLayoutType.NotSet` which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
@@ -1550,7 +1552,7 @@ export interface APIAllowedMentions {
*/
users?: Snowflake[];
/**
* For replies, whether to mention the author of the message being replied to (default false)
* For replies, whether to mention the author of the message being replied to
*
* @defaultValue `false`
*/

View File

@@ -223,7 +223,7 @@ export interface APIGuild extends APIPartialGuild {
*/
premium_subscription_count?: number;
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @defaultValue `"en-US"`
*/
@@ -291,7 +291,7 @@ export interface APIGuild extends APIPartialGuild {
*/
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @unstable https://github.com/discord/discord-api-docs/issues/6938
* @defaultValue `"en-US"`
@@ -682,7 +682,9 @@ export interface APIGuildMember {
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
* Guild member flags represented as a bit set
*
* @defaultValue `0`
*/
flags: GuildMemberFlags;
/**

View File

@@ -95,15 +95,19 @@ export interface APIApplicationCommand {
*/
default_permission?: boolean;
/**
* Indicates whether the command is age-restricted, defaults to `false`
* Indicates whether the command is age-restricted
*/
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
* Installation context(s) where the command is available, only for globally-scoped commands
*
* @defaultValue `[ApplicationIntegrationType.GuildInstall]`
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
* Interaction context(s) where the command can be used, only for globally-scoped commands
*
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
*/
contexts?: InteractionContextType[] | null;
/**

View File

@@ -363,7 +363,9 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
* The default layout type used to display posts in a forum channel
*
* @defaultValue `ForumLayoutType.NotSet` which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
@@ -1549,7 +1551,7 @@ export interface APIAllowedMentions {
*/
users?: Snowflake[];
/**
* For replies, whether to mention the author of the message being replied to (default false)
* For replies, whether to mention the author of the message being replied to
*
* @defaultValue `false`
*/

View File

@@ -223,7 +223,7 @@ export interface APIGuild extends APIPartialGuild {
*/
premium_subscription_count?: number;
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @defaultValue `"en-US"`
*/
@@ -291,7 +291,7 @@ export interface APIGuild extends APIPartialGuild {
*/
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @unstable https://github.com/discord/discord-api-docs/issues/6938
* @defaultValue `"en-US"`
@@ -674,7 +674,9 @@ export interface APIGuildMember {
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
* Guild member flags represented as a bit set
*
* @defaultValue `0`
*/
flags: GuildMemberFlags;
/**

View File

@@ -709,11 +709,9 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
/**
* The type of thread to create
*
* In API v9 and v10, `type` defaults to `PRIVATE_THREAD`.
* In a future API version this will be changed to be a required field, with no default.
*
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types}
* @defaultValue `ChannelType.PrivateThread`
* @defaultValue `ChannelType.PrivateThread` in API v9 and v10.
* In a future API version this will be changed to be a required field, with no default.
*/
type?: ThreadChannelType | undefined;
/**
@@ -765,7 +763,9 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
after?: Snowflake;
/**
* Max number of thread members to return (1-100). Defaults to 100
* Max number of thread members to return (1-100)
*
* @defaultValue `100`
*/
limit?: number;
}

View File

@@ -310,7 +310,7 @@ export interface RESTPatchAPIGuildJSONBody {
*/
public_updates_channel_id?: Snowflake | null | undefined;
/**
* The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild used in server discovery and notices from Discord
*
* @defaultValue `"en-US"` (if the value is set to `null`)
*/

View File

@@ -33,11 +33,15 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
* Whether ended entitlements should be omitted
*
* @defaultValue `false` ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
* Whether deleted entitlements should be omitted
*
* @defaultValue `true` deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

View File

@@ -178,7 +178,7 @@ export type RESTPostAPIWebhookWithTokenFormDataBody =
export interface RESTPostAPIWebhookWithTokenQuery {
/**
* Waits for server confirmation of message send before response, and returns the created message body
* (defaults to `false`; when `false` a message that is not saved does not return an error)
* (when `false` a message that is not saved does not return an error)
*
* @defaultValue `false`
*/
@@ -191,7 +191,7 @@ export interface RESTPostAPIWebhookWithTokenQuery {
thread_id?: Snowflake;
/**
* Whether to allow sending (non-interactive) components for non-application-owned webhooks
* (defaults to `false`; ignored for application-owned webhooks)
* (ignored for application-owned webhooks)
*
* @defaultValue `false`
*/

View File

@@ -723,11 +723,9 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
/**
* The type of thread to create
*
* In API v9, `type` defaults to `PRIVATE_THREAD`.
* In a future API version this will be changed to be a required field, with no default.
*
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types}
* @defaultValue `ChannelType.PrivateThread`
* @defaultValue `ChannelType.PrivateThread` in API v9.
* In a future API version this will be changed to be a required field, with no default.
*/
type?: ThreadChannelType | undefined;
/**
@@ -779,7 +777,9 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
after?: Snowflake;
/**
* Max number of thread members to return (1-100). Defaults to 100
* Max number of thread members to return (1-100)
*
* @defaultValue `100`
*/
limit?: number;
}

2
deno/rest/v9/guild.ts generated
View File

@@ -310,7 +310,7 @@ export interface RESTPatchAPIGuildJSONBody {
*/
public_updates_channel_id?: Snowflake | null | undefined;
/**
* The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild used in server discovery and notices from Discord
*
* @defaultValue `"en-US"` (if the value is set to `null`)
*/

View File

@@ -33,11 +33,15 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
* Whether ended entitlements should be omitted
*
* @defaultValue `false` ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
* Whether deleted entitlements should be omitted
*
* @defaultValue `true` deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

View File

@@ -178,7 +178,7 @@ export type RESTPostAPIWebhookWithTokenFormDataBody =
export interface RESTPostAPIWebhookWithTokenQuery {
/**
* Waits for server confirmation of message send before response, and returns the created message body
* (defaults to `false`; when `false` a message that is not saved does not return an error)
* (when `false` a message that is not saved does not return an error)
*
* @defaultValue `false`
*/
@@ -191,7 +191,7 @@ export interface RESTPostAPIWebhookWithTokenQuery {
thread_id?: Snowflake;
/**
* Whether to allow sending (non-interactive) components for non-application-owned webhooks
* (defaults to `false`; ignored for application-owned webhooks)
* (ignored for application-owned webhooks)
*
* @defaultValue `false`
*/

4
deno/rpc/v10.ts generated
View File

@@ -435,7 +435,9 @@ export interface RPCSetUserVoiceSettingsArgs {
*/
pan?: RPCVoicePan;
/**
* Set the volume of user (defaults to 100, min 0, max 200)
* Set the volume of user (min 0, max 200)
*
* @defaultValue `100`
*/
volume?: number;
/**

View File

@@ -95,15 +95,21 @@ export interface APIApplicationCommand {
*/
default_permission?: boolean;
/**
* Indicates whether the command is age-restricted, defaults to `false`
* Indicates whether the command is age-restricted
*
* @defaultValue `false`
*/
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
* Installation context(s) where the command is available, only for globally-scoped commands
*
* @defaultValue `[ApplicationIntegrationType.GuildInstall]`
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
* Interaction context(s) where the command can be used, only for globally-scoped commands
*
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
*/
contexts?: InteractionContextType[] | null;
/**

View File

@@ -363,7 +363,9 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
* The default layout type used to display posts in a forum channel
*
* @defaultValue `ForumLayoutType.NotSet` which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
@@ -1550,7 +1552,7 @@ export interface APIAllowedMentions {
*/
users?: Snowflake[];
/**
* For replies, whether to mention the author of the message being replied to (default false)
* For replies, whether to mention the author of the message being replied to
*
* @defaultValue `false`
*/

View File

@@ -223,7 +223,7 @@ export interface APIGuild extends APIPartialGuild {
*/
premium_subscription_count?: number;
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @defaultValue `"en-US"`
*/
@@ -291,7 +291,7 @@ export interface APIGuild extends APIPartialGuild {
*/
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @unstable https://github.com/discord/discord-api-docs/issues/6938
* @defaultValue `"en-US"`
@@ -682,7 +682,9 @@ export interface APIGuildMember {
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
* Guild member flags represented as a bit set
*
* @defaultValue `0`
*/
flags: GuildMemberFlags;
/**

View File

@@ -95,15 +95,19 @@ export interface APIApplicationCommand {
*/
default_permission?: boolean;
/**
* Indicates whether the command is age-restricted, defaults to `false`
* Indicates whether the command is age-restricted
*/
nsfw?: boolean;
/**
* Installation context(s) where the command is available, only for globally-scoped commands. Defaults to `GUILD_INSTALL ([0])`
* Installation context(s) where the command is available, only for globally-scoped commands
*
* @defaultValue `[ApplicationIntegrationType.GuildInstall]`
*/
integration_types?: ApplicationIntegrationType[];
/**
* Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.
* Interaction context(s) where the command can be used, only for globally-scoped commands
*
* @defaultValue `[InteractionContextType.Guild, InteractionContextType.BotDM, InteractionContextType.PrivateChannel]`
*/
contexts?: InteractionContextType[] | null;
/**

View File

@@ -363,7 +363,9 @@ export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | Channel
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
* The default layout type used to display posts in a forum channel
*
* @defaultValue `ForumLayoutType.NotSet` which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
@@ -1549,7 +1551,7 @@ export interface APIAllowedMentions {
*/
users?: Snowflake[];
/**
* For replies, whether to mention the author of the message being replied to (default false)
* For replies, whether to mention the author of the message being replied to
*
* @defaultValue `false`
*/

View File

@@ -223,7 +223,7 @@ export interface APIGuild extends APIPartialGuild {
*/
premium_subscription_count?: number;
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @defaultValue `"en-US"`
*/
@@ -291,7 +291,7 @@ export interface APIGuild extends APIPartialGuild {
*/
export interface APIPartialInteractionGuild extends Pick<APIGuild, 'features' | 'id'> {
/**
* The preferred locale of a Community guild; used in guild discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild; used in guild discovery and notices from Discord
*
* @unstable https://github.com/discord/discord-api-docs/issues/6938
* @defaultValue `"en-US"`
@@ -674,7 +674,9 @@ export interface APIGuildMember {
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
* Guild member flags represented as a bit set
*
* @defaultValue `0`
*/
flags: GuildMemberFlags;
/**

View File

@@ -709,11 +709,9 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
/**
* The type of thread to create
*
* In API v9 and v10, `type` defaults to `PRIVATE_THREAD`.
* In a future API version this will be changed to be a required field, with no default.
*
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types}
* @defaultValue `ChannelType.PrivateThread`
* @defaultValue `ChannelType.PrivateThread` in API v9 and v10.
* In a future API version this will be changed to be a required field, with no default.
*/
type?: ThreadChannelType | undefined;
/**
@@ -765,7 +763,9 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
after?: Snowflake;
/**
* Max number of thread members to return (1-100). Defaults to 100
* Max number of thread members to return (1-100)
*
* @defaultValue `100`
*/
limit?: number;
}

View File

@@ -310,7 +310,7 @@ export interface RESTPatchAPIGuildJSONBody {
*/
public_updates_channel_id?: Snowflake | null | undefined;
/**
* The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild used in server discovery and notices from Discord
*
* @defaultValue `"en-US"` (if the value is set to `null`)
*/

View File

@@ -33,11 +33,15 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
* Whether ended entitlements should be omitted
*
* @defaultValue `false` ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
* Whether deleted entitlements should be omitted
*
* @defaultValue `true` deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

View File

@@ -178,7 +178,7 @@ export type RESTPostAPIWebhookWithTokenFormDataBody =
export interface RESTPostAPIWebhookWithTokenQuery {
/**
* Waits for server confirmation of message send before response, and returns the created message body
* (defaults to `false`; when `false` a message that is not saved does not return an error)
* (when `false` a message that is not saved does not return an error)
*
* @defaultValue `false`
*/
@@ -191,7 +191,7 @@ export interface RESTPostAPIWebhookWithTokenQuery {
thread_id?: Snowflake;
/**
* Whether to allow sending (non-interactive) components for non-application-owned webhooks
* (defaults to `false`; ignored for application-owned webhooks)
* (ignored for application-owned webhooks)
*
* @defaultValue `false`
*/

View File

@@ -723,11 +723,9 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
/**
* The type of thread to create
*
* In API v9, `type` defaults to `PRIVATE_THREAD`.
* In a future API version this will be changed to be a required field, with no default.
*
* @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types}
* @defaultValue `ChannelType.PrivateThread`
* @defaultValue `ChannelType.PrivateThread` in API v9.
* In a future API version this will be changed to be a required field, with no default.
*/
type?: ThreadChannelType | undefined;
/**
@@ -779,7 +777,9 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
after?: Snowflake;
/**
* Max number of thread members to return (1-100). Defaults to 100
* Max number of thread members to return (1-100)
*
* @defaultValue `100`
*/
limit?: number;
}

View File

@@ -310,7 +310,7 @@ export interface RESTPatchAPIGuildJSONBody {
*/
public_updates_channel_id?: Snowflake | null | undefined;
/**
* The preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
* The preferred locale of a Community guild used in server discovery and notices from Discord
*
* @defaultValue `"en-US"` (if the value is set to `null`)
*/

View File

@@ -33,11 +33,15 @@ export interface RESTGetAPIEntitlementsQuery {
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted. Defaults to `false`, ended entitlements are included by default
* Whether ended entitlements should be omitted
*
* @defaultValue `false` ended entitlements are included by default
*/
exclude_ended?: boolean | undefined;
/**
* Whether deleted entitlements should be omitted. Defaults to `true`, deleted entitlements are not included by default
* Whether deleted entitlements should be omitted
*
* @defaultValue `true` deleted entitlements are not included by default
*/
exclude_deleted?: boolean | undefined;
}

View File

@@ -178,7 +178,7 @@ export type RESTPostAPIWebhookWithTokenFormDataBody =
export interface RESTPostAPIWebhookWithTokenQuery {
/**
* Waits for server confirmation of message send before response, and returns the created message body
* (defaults to `false`; when `false` a message that is not saved does not return an error)
* (when `false` a message that is not saved does not return an error)
*
* @defaultValue `false`
*/
@@ -191,7 +191,7 @@ export interface RESTPostAPIWebhookWithTokenQuery {
thread_id?: Snowflake;
/**
* Whether to allow sending (non-interactive) components for non-application-owned webhooks
* (defaults to `false`; ignored for application-owned webhooks)
* (ignored for application-owned webhooks)
*
* @defaultValue `false`
*/

View File

@@ -435,7 +435,9 @@ export interface RPCSetUserVoiceSettingsArgs {
*/
pan?: RPCVoicePan;
/**
* Set the volume of user (defaults to 100, min 0, max 200)
* Set the volume of user (min 0, max 200)
*
* @defaultValue `100`
*/
volume?: number;
/**