Skip to content

Commit

Permalink
types: Add defaultValues to respective select menu components data (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
fronkdev and Jiralite committed May 13, 2024
1 parent 616208b commit c2432d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -6367,19 +6369,25 @@ export interface StringSelectMenuComponentData extends BaseSelectMenuComponentDa

export interface UserSelectMenuComponentData extends BaseSelectMenuComponentData {
type: ComponentType.UserSelect;
defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.User>[];
}

export interface RoleSelectMenuComponentData extends BaseSelectMenuComponentData {
type: ComponentType.RoleSelect;
defaultValues?: readonly APISelectMenuDefaultValue<SelectMenuDefaultValueType.Role>[];
}

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<SelectMenuDefaultValueType.Channel>[];
}

export interface MessageSelectOption {
Expand Down

0 comments on commit c2432d5

Please sign in to comment.