Represents an interactive message, which can later be replaced or deleted.
Same as destroy, but keeps the message and disables the components on it. This prevents it from listening to user interactions.
Remove this message
Render some JSX to this instance (edits the message)
Get the associated instance for the current component.
Common props between button-like components
When true, the button will be slightly faded, and cannot be clicked.
Renders an emoji to the left of the text.
Has to be a literal emoji character (e.g. 🍍),
or an emoji code, like <:plus_one:778531744860602388>
.
To get an emoji code, type your emoji in Discord chat
with a backslash \
in front.
The bot has to be in the emoji's guild to use it.
The text on the button. Rich formatting (markdown) is not supported here.
The text shown to the user
Description for the option, shown to the user
Renders an emoji to the left of the text.
Has to be a literal emoji character (e.g. 🍍),
or an emoji code, like <:plus_one:778531744860602388>
.
To get an emoji code, type your emoji in Discord chat
with a backslash \
in front.
The bot has to be in the emoji's guild to use it.
The text shown to the user. This takes priority over children
The internal value of this option
When true, the select will be slightly faded, and cannot be interacted with.
With multiple
, the maximum number of values that can be selected.
When multiple
is false or not defined, this is always 1.
This only limits the number of values that can be received by the user. This does not limit the number of values that can be displayed by you.
With multiple
, the minimum number of values that can be selected.
When multiple
is false or not defined, this is always 1.
This only limits the number of values that can be received by the user. This does not limit the number of values that can be displayed by you.
Set to true to allow multiple selected values
The text shown when no value is selected
Sets the currently selected value
Sets the currently selected values, for use with multiple
Called when the user inputs a selection. Receives the entire select change event, which can be used to create new replies, etc.
Convenience shorthand for onChange
, which receives all selected values.
Convenience shorthand for onChange
, which receives the first selected value.
See the select menu guide for a usage example.
Props for an action row
An action row is a top-level container for message components.
You don't need to use this; Reacord automatically creates action rows for you. But this can be useful if you want a specific layout.
// put buttons on two separate rows
<ActionRow>
<Button label="First" onClick={handleFirst} />
</ActionRow>
<Button label="Second" onClick={handleSecond} />
The channel that this event occurred in.
The guild that this event occurred in.
The message associated with this event. For example: with a button click, this is the message that the button is on.
The user that triggered this event.
Create an ephemeral reply to this event, shown only to the user who triggered it.
Create a new reply to this event.
The IDs of mentioned users
Generated using TypeDoc
The max number of active instances. When this limit is exceeded, the oldest instances will be disabled.