Interface Component
-
- All Superinterfaces:
SerializableData
- All Known Subinterfaces:
Button
,SelectionMenu
public interface Component extends SerializableData
Component of a Message.
These are used to extend messages with interactive elements such as buttons or dropdown menus.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Component.Type
The component types
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getId()
The component ID or null.default int
getMaxPerRow()
How many of these components can be added to oneActionRow
.Component.Type
getType()
The type of component.-
Methods inherited from interface net.dv8tion.jda.api.utils.data.SerializableData
toData
-
-
-
-
Method Detail
-
getType
@Nonnull Component.Type getType()
The type of component.- Returns:
Component.Type
-
getId
@Nullable java.lang.String getId()
The component ID or null.
Some components such as link buttons don't have this.This need not be a numeric ID! All these component IDs are custom and not generated by Discord.
- Returns:
- The component ID or null if not present
-
getMaxPerRow
default int getMaxPerRow()
How many of these components can be added to oneActionRow
.- Returns:
- The maximum amount an action row can contain
-
-