SelectionBuilder
SelectionBuilder is used to construct a selection (dropdown) component for a Discord message.
Properties
Type
SelectionBuilder.Type :: table
An enumeration of selection types.
- TextSelection: 3
- UserSelection: 5
- RoleSelection: 6
- MentionableSelection: 7
- ChannelSelection: 8
ChannelType
SelectionBuilder.ChannelType :: table
An enumeration of channel types.
- GuildText: 0
- DirectMessage: 1
- GuildVoice: 2
- GroupDirectMessage: 3
- GuildCategory: 4
- GuildAnnouncement: 5
- AnnouncementThread: 10
- PublicThread: 11
- PrivateThread: 12
- GuildStageVoice: 13
- GuildDirectory: 14
- GuildForum: 15
Methods
setType
SelectionBuilder : setType () -> Builders.Interface.SelectionBuilder
selectionType: number
Sets the type of the selection.
setChannelTypes
SelectionBuilder : setChannelTypes () -> Builders.Interface.SelectionBuilder
...: number
Sets the channel types for the selection.
setPlaceholder
SelectionBuilder : setPlaceholder () -> Builders.Interface.SelectionBuilder
placeholderText: string
Sets the placeholder text for the selection.
setDisabled
SelectionBuilder : setDisabled () -> Builders.Interface.SelectionBuilder
isDisabled: boolean
Sets whether the selection is disabled.
setMinValues
SelectionBuilder : setMinValues () -> Builders.Interface.SelectionBuilder
minValue: number
Sets the minimum number of values that must be selected.
setMaxValues
SelectionBuilder : setMaxValues () -> Builders.Interface.SelectionBuilder
maxValue: number
Sets the maximum number of values that can be selected.
addChoice
SelectionBuilder : addChoice () -> Builders.Interface.SelectionBuilder
choiceName: string
choiceValue: string
choiceDescription: string
isDefault: boolean
emojiId: string?
emojiName: string?
Adds a choice to the selection.
destroyChoice
SelectionBuilder : destroyChoice () -> Builders.Interface.SelectionBuilder
choiceName: string
Removes a choice from the selection.
toPayloadObject
SelectionBuilder : toPayloadObject () -> Network.Resolvable
Converts the selection to a JSON object that can be sent to the Discord API.
Functions
new
SelectionBuilder . new () -> ()
selectionId: string
Creates a new instance of SelectionBuilder.