Components
Components are used to create interactive elements in your bot, such as buttons, select menus, and text inputs.
When you create a component, you will need to pass it to the components
property of the Command
class. This will allow it to be registered with the bot as a handler.
When you pass it, make sure you aren't instantiating it, but rather just passing the class itself.
If you don't want to automatically register the components, you can do so manually by setting the autoRegister
option to false
in the client options.
Buttons
Buttons appear below messages and can be used to trigger actions or link to external sources.
Container
A container component that groups and organizes other components in a message.
File
A component for displaying file attachments in messages.
MediaGallery
A component for displaying multiple images in a gallery format.
Section
A component that groups related information horizontally with an optional accessory.
Select Menus
Select menus are used to select an option from a list of options in a dropdown
TextDisplay
A component for displaying text content in messages.
Text Inputs
Text Inputs are blank text fields used solely within Modals to collect user input.
Thumbnail
A component for displaying small images in messages.
Edit on GitHub
Last updated on