Package discord4j.core.object
Class MessageInteraction
java.lang.Object
discord4j.core.object.MessageInteraction
- All Implemented Interfaces:
DiscordObject
A Discord Message Interaction.
- See Also:
-
Constructor Summary
ConstructorDescriptionMessageInteraction
(GatewayDiscordClient gateway, discord4j.discordjson.json.MessageInteractionData data) Constructs aMessageInteraction
with an associatedGatewayDiscordClient
and Discord data. -
Method Summary
Modifier and TypeMethodDescriptionfinal GatewayDiscordClient
Returns theGatewayDiscordClient
that created this object.getId()
Gets the id of the interaction.getName()
Gets the name of theApplicationCommand
.getType()
Gets the type of interaction.getUser()
Gets the user who invoked the interaction.
-
Constructor Details
-
MessageInteraction
public MessageInteraction(GatewayDiscordClient gateway, discord4j.discordjson.json.MessageInteractionData data) Constructs aMessageInteraction
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.
-
-
Method Details
-
getId
Gets the id of the interaction.- Returns:
- The id of the interaction.
-
getType
Gets the type of interaction.- Returns:
- The type of interaction
-
getName
Gets the name of theApplicationCommand
.- Returns:
- The name of the
ApplicationCommand
.
-
getUser
Gets the user who invoked the interaction.- Returns:
- The user who invoked the interaction.
-
getClient
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-