Commands
The command API is centered on definitions, not subclasses. Primary exports:defineCommanddefineSubcommandopt.*CommandContextCommandManager
ctx.options based on the definition.
Classic message components
For V1-style component rows, the important exports are:defineButtonButton.*ActionRowdefineStringSelect- other select definitions
ComponentContext
Button helper now works in both classic rows and V2 accessories.
Components V2
For V2 layouts, the main exports are:ContainerSectionTextDisplayThumbnailSeparatorLabel
Modals
The recommended modal exports are:modal(customId, title)field.shortfield.paragraphfield.checkboxfield.radioGroupfield.checkboxGroupfield.fileUploadModalContext
ctx.fields is inferred from the modal definition, and uploaded files are exposed through ctx.attachments[fieldId].
Register the modal submit handler through the command manager:
Registration surfaces
There are two different registration paths:client.commands.register(...)for application commandsclient.commands.registerModal(...)for modal submit handlersclient.components.register(...)for message components such as buttons and selects
Recommended public entry points
If you are writing application code rather than extending the framework internals, start here:- slash commands:
defineCommand,opt.* - buttons:
Button.* - classic layouts:
ActionRow.of(...) - V2 layouts:
Container.stack(...),Section.text(...).accessory(...) - modals:
modal(...).add(...).handle(...),field.*,client.commands.registerModal(...)