diff --git a/index.d.ts b/index.d.ts index 00fe740e..0c13e33b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -167,9 +167,9 @@ declare namespace Dysnomia { type MessageContentEdit = string | AdvancedMessageContent<"isMessageEdit">; type MFALevel = Constants["MFALevels"][keyof Constants["MFALevels"]]; type PossiblyUncachedMessage = Message | { author?: User | Uncached; channel: TextableChannel | { id: string; guild?: Uncached }; guildID?: string; id: string }; - type SelectMenu = BaseSelectMenu | ChannelSelectMenu | StringSelectMenu; + type SelectMenu = BaseSelectMenu | ChannelSelectMenu | StringSelectMenu | UserSelectMenu | RoleSelectMenu | MentionableSelectMenu; type SelectMenuTypes = Constants["ComponentTypes"][keyof Pick]; - type SelectMenuExtendedTypes = Constants["ComponentTypes"][keyof Pick]; + type SelectMenuExtendedTypes = Constants["ComponentTypes"][keyof Pick]; // Permission @@ -1465,6 +1465,7 @@ declare namespace Dysnomia { } interface ChannelSelectMenu extends SelectMenuBase { channel_types?: GuildChannelTypes[]; + default_values?: SelectMenuDefaultValue<"channel">[]; type: Constants["ComponentTypes"]["CHANNEL_SELECT"]; } interface CreateStickerOptions extends Required> { @@ -1481,6 +1482,18 @@ declare namespace Dysnomia { name?: string; tags?: string; } + interface MentionableSelectMenu extends SelectMenuBase { + default_values?: SelectMenuDefaultValue<"any">[]; + type: Constants["ComponentTypes"]["MENTIONABLE_SELECT"]; + } + interface RoleSelectMenu extends SelectMenuBase { + default_values?: SelectMenuDefaultValue<"role">[]; + type: Constants["ComponentTypes"]["ROLE_SELECT"]; + } + interface UserSelectMenu extends SelectMenuBase { + default_values?: SelectMenuDefaultValue<"user">[]; + type: Constants["ComponentTypes"]["USER_SELECT"]; + } interface BaseSelectMenu extends SelectMenuBase { type: BaseSelectMenuTypes; } @@ -1496,6 +1509,10 @@ declare namespace Dysnomia { options: SelectMenuOptions[]; type: Constants["ComponentTypes"]["STRING_SELECT"]; } + interface SelectMenuDefaultValue { + id: string; + type: Type extends "any" ? ("user" | "role" | "channel") : Type; + } interface SelectMenuOptions { default?: boolean; description?: string;