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
The button's style (1 ~ 5). See on the discord api docs.
Type: str
Default: 2 (Gray)
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
from_dict
Creates component instance from json. This is a static method.
Parameters:
data (dict
) - The json to construct button from.
Returns: