select(), in any file of src/, and exported. Declare its options, and run receives what was picked, typed from them.
src/components/color.ts
src/commands/color.ts
value is 'red' | 'blue' | 'green', and values is the list of everything picked. A menu takes a whole row by itself.
Options
options is written in one of three ways:
Up to 25 options.
min and max say how many can be picked (1 by default): with max: 3, values holds up to three.
src/components/toppings.ts
Users, roles and channels
With atype, Discord fills the menu with the server: 'user', 'role', 'mentionable' (users and roles) or 'channel'. values is then a list of User, Role, User | Role or Channel, and channelTypes narrows what channels are listed.
src/components/helpers.ts
src/components/logs.ts
What a menu is shown with
Where you put the menu in a message, pass what to show:placeholder, disabled, and defaults, what is picked when the menu appears (the values of the options, or the ids of the users, roles or channels):
src/commands/setup.ts
data takes it first: menu({ page: 2 }, { defaults: ['blue'] }).
Forms
Ask for text and choices in a form that opens in Discord.
Embeds and layout
Reuse an embed, and build messages out of texts, sections and containers.