From c2432d5704e4e178c044bc0d02f2dabe51450d19 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 13 May 2024 14:29:16 +0100 Subject: [PATCH] types: Add `defaultValues` to respective select menu components data (#10265) * Update index.d.ts Added 'defaultValues' typings for ChannelSelectMenuComponentData, RoleSelectMenuComponentData, and UserSelectMenuComponentData. * Update index.d.ts Adding 'defaultValues' typing to MentionableSelectMenuComponentData * style: prettier --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> --- packages/discord.js/typings/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index b4ff840dbc9b..e2642916db8a 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -178,6 +178,8 @@ import { APIPoll, PollLayoutType, APIPollAnswer, + APISelectMenuDefaultValue, + SelectMenuDefaultValueType, } from 'discord-api-types/v10'; import { ChildProcess } from 'node:child_process'; import { EventEmitter } from 'node:events'; @@ -6367,19 +6369,25 @@ export interface StringSelectMenuComponentData extends BaseSelectMenuComponentDa export interface UserSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.UserSelect; + defaultValues?: readonly APISelectMenuDefaultValue[]; } export interface RoleSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.RoleSelect; + defaultValues?: readonly APISelectMenuDefaultValue[]; } export interface MentionableSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.MentionableSelect; + defaultValues?: readonly APISelectMenuDefaultValue< + SelectMenuDefaultValueType.Role | SelectMenuDefaultValueType.User + >[]; } export interface ChannelSelectMenuComponentData extends BaseSelectMenuComponentData { type: ComponentType.ChannelSelect; channelTypes?: readonly ChannelType[]; + defaultValues?: readonly APISelectMenuDefaultValue[]; } export interface MessageSelectOption {