From a2d8afb462450619d03275c868f359bdc6fc9c4d Mon Sep 17 00:00:00 2001 From: Fleny Date: Sat, 6 Jul 2024 23:30:19 +0200 Subject: [PATCH] Document the position behavior for duplicate position values (#3690) --- packages/types/src/discord.ts | 4 ++-- packages/types/src/discordeno.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/types/src/discord.ts b/packages/types/src/discord.ts index abdb1ba3e..40c9d4814 100644 --- a/packages/types/src/discord.ts +++ b/packages/types/src/discord.ts @@ -946,7 +946,7 @@ export interface DiscordRole { name: string /** Integer representation of hexadecimal color code */ color: number - /** Position of this role */ + /** Position of this role (roles with the same position are sorted by id) */ position: number /** role unicode emoji */ unicode_emoji?: string @@ -1028,7 +1028,7 @@ export interface DiscordChannel { type: ChannelTypes /** The id of the guild */ guild_id?: string - /** Sorting position of the channel */ + /** Sorting position of the channel (channels with the same position are sorted by id) */ position?: number /** Explicit permission overwrites for members and roles */ permission_overwrites?: DiscordOverwrite[] diff --git a/packages/types/src/discordeno.ts b/packages/types/src/discordeno.ts index 702c051fb..3d69c4b90 100644 --- a/packages/types/src/discordeno.ts +++ b/packages/types/src/discordeno.ts @@ -565,7 +565,7 @@ export interface CreateGuildChannel { userLimit?: number /** Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission `manage_messages` or `manage_channel`, are unaffected */ rateLimitPerUser?: number - /** Sorting position of the channel */ + /** Sorting position of the channel (channels with the same position are sorted by id) */ position?: number /** The channel's permission overwrites */ permissionOverwrites?: OverwriteReadable[] @@ -656,7 +656,7 @@ export interface ModifyChannel { name?: string /** The type of channel; only conversion between text and news is supported and only in guilds with the "NEWS" feature */ type?: ChannelTypes - /** The position of the channel in the left-hand listing */ + /** The position of the channel in the left-hand listing (channels with the same position are sorted by id) */ position?: number | null /** 0-1024 character channel topic */ topic?: string | null @@ -719,7 +719,7 @@ export interface EditChannelPermissionOverridesOptions extends OverwriteReadable export interface ModifyGuildChannelPositions { /** Channel id */ id: BigString - /** Sorting position of the channel */ + /** Sorting position of the channel (channels with the same position are sorted by id) */ position?: number | null /** Syncs the permission overwrites with the new parent, if moving to a new category */ lockPositions?: boolean | null @@ -1079,7 +1079,7 @@ export interface EditGuildRole { export interface ModifyRolePositions { /** The role id */ id: BigString - /** The sorting position for the role. */ + /** The sorting position for the role. (roles with the same position are sorted by id) */ position?: number | null }