Button
Last updated
Last updated
The button component.
Extends: discord-components.Component
label
The button's label. You don't have to provide this if you provided emoji
.
Type: str
style
id
The button's custom id.
If not provided, it is a random value.
Type: str
url
The button's url (this works only if the style
is 5
).
Type: str
disabled
Indicates if the button is disabled.
Type: bool
Default: False
emoji
The button’s emoji.
Type: discord.Emoji
| discord.PartialEmoji
| str
label
The button's label.
Type: str
style
The button's style (1 ~ 5). See more information on the discord api docs.
Type: str
id
The button's custom id.
Type: str
url
The button's url.
Type: str
disabled
Indicates if the button is disabled.
Type: bool
emoji
The button’s emoji.
Type: discord.Emoji
| discord.PartialEmoji
| str
to_dict
Gets the component information required for API requests in dict form.
Returns: dict
from_dict
Creates component instance from json. This is a static method.
Parameters:
data (dict
) - The json to construct button from.
Returns: discord-components.Button