Skip to main content

Component

@discordeno/bot


Documentation / @discordeno/bot / Component

Interface: Component

Defined in: packages/bot/src/transformers/types.ts:511

Properties

channelTypes?

optional channelTypes: ChannelTypes[]

Defined in: packages/bot/src/transformers/types.ts:531

List of channel types to include in a channel select menu options list


components?

optional components: Component[]

Defined in: packages/bot/src/transformers/types.ts:545

a list of child components


customId?

optional customId: string

Defined in: packages/bot/src/transformers/types.ts:515

a developer-defined identifier for the component, max 100 characters


defaultValues?

optional defaultValues: DiscordComponentDefaultValue[]

Defined in: packages/bot/src/transformers/types.ts:547

List of default values for auto-populated select menu components; number of default values must be in the range defined by min_values and max_values


disabled?

optional disabled: boolean

Defined in: packages/bot/src/transformers/types.ts:519

whether the component is disabled, default false


emoji?

optional emoji: Pick<Partial<Emoji>, "id" | "name" | "animated">

Defined in: packages/bot/src/transformers/types.ts:527

Emoji object that includes fields of name, id, and animated supporting unicode and custom emojis.


label?

optional label: string

Defined in: packages/bot/src/transformers/types.ts:523

text that appears on the button (max 80 characters)


maxLength?

optional maxLength: number

Defined in: packages/bot/src/transformers/types.ts:543

The maximum input length for a text input. Between 1-4000.


maxValues?

optional maxValues: number

Defined in: packages/bot/src/transformers/types.ts:539

The maximum number of items that can be selected. Default 1. Between 1-25.


minLength?

optional minLength: number

Defined in: packages/bot/src/transformers/types.ts:541

The minimum input length for a text input. Between 0-4000.


minValues?

optional minValues: number

Defined in: packages/bot/src/transformers/types.ts:537

The minimum number of items that must be selected. Default 1. Between 1-25.


options?

optional options: SelectOption[]

Defined in: packages/bot/src/transformers/types.ts:533

The choices! Maximum of 25 items.


placeholder?

optional placeholder: string

Defined in: packages/bot/src/transformers/types.ts:535

A custom placeholder text if nothing is selected. Maximum 150 characters.


required?

optional required: boolean

Defined in: packages/bot/src/transformers/types.ts:517

whether this component is required to be filled, default true


skuId?

optional skuId: bigint

Defined in: packages/bot/src/transformers/types.ts:549

Identifier for a purchasable SKU, only available when using premium-style buttons


style?

optional style: ButtonStyles | TextStyles

Defined in: packages/bot/src/transformers/types.ts:521

For different styles/colors of the buttons


type

type: MessageComponentTypes

Defined in: packages/bot/src/transformers/types.ts:513

component type


url?

optional url: string

Defined in: packages/bot/src/transformers/types.ts:529

optional url for link-style buttons that can navigate a user to the web. Only type 5 Link buttons can have a url


value?

optional value: string

Defined in: packages/bot/src/transformers/types.ts:525

the dev-define value of the option, max 100 characters for select or 4000 for input.