dbd.ts
  • Welcome
  • Changelog
  • Guides
    • Adding Events
    • Author-Only Interactions
    • Bot Options
    • Command Handler
    • Context Menus
    • Custom Functions
    • Slash Commands
    • Statuses
    • Variables
  • Callbacks
    • onBotJoin
    • onBotLeave
    • onJoin
    • onLeave
    • onReactionAdd
    • onReactionRemove
    • onReady
    • Space Commands
  • Functions
    • $addActionRow
    • $addButton
    • $addCmdReactions
    • $addField
    • $addSelectMenu
    • $addSelectMenuOption
    • $addThreadMember
    • $addTimestamp
    • $akarui
    • $allMembersCount
    • $approximateMemberCount
    • $approximatePrecenseCount
    • $archiveThread
    • $argCount
    • $attachment
    • $author
    • $authorAvatar
    • $authorID
    • $awaitMessage
    • $ban
    • $banCount
    • $botCount
    • $botLeave
    • $botOwnerID
    • $callFunction
    • $channelCategoryID
    • $channelExists
    • $channelGuildID
    • $channelID
    • $channelName
    • $channelNSFW
    • $channelSendMessage
    • $channelTopic
    • $channelType
    • $checkCondition
    • $clearAllReactions
    • $clearMessages
    • $clearUserMessages
    • $clientID
    • $clientToken
    • $cloneChannel
    • $color
    • $cooldown
    • $cpu
    • $createContextMenuApplication
    • $createFile
    • $createObject
    • $createSlashCommand
    • $createTextChannel
    • $dbPing
    • $defer
    • $delete
    • $deleteChannels
    • $deletecommand
    • $deleteEmojis
    • $deleteMessage
    • $deleteMessageRow
    • $deleteMessageRows
    • $deleteRoles
    • $description
    • $discriminator
    • $divide
    • $djsEval
    • $editMEssage
    • $editMessageRows
    • $endsWith
    • $ephemeral
    • $eval
    • $executionTime
    • $fetchGuildMembers
    • $filter
    • $footer
    • $formatMS
    • $functionCount
    • $get
    • $getChannelSlowmode
    • $getCooldownTime
    • $getServerInvite
    • $getSlashCommandData
    • $getSlashCommandOption
    • $getTimestamp
    • $getUserBadges
    • $guildID
    • $if
    • $ignoreCode
    • $includes
    • $indexOf
    • $isBot
    • $isNumber
    • $kick
    • $let
    • $log
    • $makeReturn
    • $math
    • $packageName
    • $ram
    • $readyTimestamp
    • $replaceText
    • $round
  • Typedefs
    • ApplicationCommandTypes
    • ButtonStyles
    • ComparisonSymbols
    • ImageSizes
    • SlashCommandOptionProperty
    • SlashCommandProperty
Powered by GitBook
On this page
  • Usage
  • Example

Was this helpful?

  1. Functions

$addSelectMenu

Adds a select menu to this action row.

Previous$addFieldNext$addSelectMenuOption

Last updated 3 years ago

Was this helpful?

Usage

$addSelectMenu[customID;placeholder;minValues;maxValues;disabled]

This function has five parms.

Param
Description
Type
Required

customID

The customID of this select menu.

String

Yes

placeholder

The select menu's placeholder.

String

Yes

minValues

The minimum amount of options that the user can select.

Integer

Yes

maxValues

The maximum amount of options that the user can select.

Integer

Yes

disabled

Whether this select menu should be disabled or not.

Boolean

Yes

  • Select menus must be sent inside an action row (refer to ).

  • An action row can contain only one select menu.

  • An action row containing a select menu cannot also contain buttons.

Don't forget to add the onInteraction event to your main file. For example:

bot.addEvent([
    "onMessage",
    "onInteraction" //This is what you need to add
])

Example

bot.commands.add({
    type: "basicCommand",
    name: "menu", 
    code: `A menu!
    $addActionRow
    $addSelectMenu[menu_1;Hi;1;1]
    $addSelectMenuOption[hi;im uwu;hi]
    $addSelectMenuOption[fiction;nice stuff;fiction]`
})

bot.commands.add({    
    type: "selectMenuCommand",
    code: `Interaction Value: $interactionValues | Interaction ID: $interactionID`
})

for more info about$addSelectMenuOption[]

$addActionRow
Click here