Package org.javacord.core.interaction
Class ApplicationCommandInteractionImpl
- java.lang.Object
-
- org.javacord.core.interaction.InteractionImpl
-
- org.javacord.core.interaction.ApplicationCommandInteractionImpl
-
- All Implemented Interfaces:
DiscordEntity
,ApplicationCommandInteraction
,Interaction
,InteractionBase
,Specializable<InteractionBase>
- Direct Known Subclasses:
MessageContextMenuInteractionImpl
,SlashCommandInteractionImpl
,UserContextMenuInteractionImpl
public class ApplicationCommandInteractionImpl extends InteractionImpl implements ApplicationCommandInteraction
-
-
Field Summary
Fields Modifier and Type Field Description protected long
commandId
protected java.lang.String
commandName
protected java.lang.Long
registeredCommandServerId
-
Constructor Summary
Constructors Constructor Description ApplicationCommandInteractionImpl(DiscordApiImpl api, TextChannel channel, com.fasterxml.jackson.databind.JsonNode jsonData)
Class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCommandId()
java.lang.String
getCommandIdAsString()
java.lang.String
getCommandName()
java.util.Optional<java.lang.Long>
getRegisteredCommandServerId()
InteractionType
getType()
-
Methods inherited from class org.javacord.core.interaction.InteractionImpl
createFollowupMessageBuilder, createImmediateResponder, getApi, getApplicationId, getBotPermissions, getChannel, getId, getLocale, getServer, getServerLocale, getToken, getUser, getVersion, respondLater, respondLater, respondWithModal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.javacord.api.interaction.ApplicationCommandInteraction
getRegisteredCommandServer
-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.interaction.Interaction
asAutocompleteInteraction, asAutocompleteInteraction, asMessageComponentInteraction, asMessageComponentInteractionWithCustomId, asMessageContextMenuInteraction, asMessageContextMenuInteractionWithCommandId, asModalInteraction, asModalInteractionWithCustomId, asSlashCommandInteraction, asSlashCommandInteractionWithCommandId, asUserContextMenuInteraction, asUserContextMenuInteractionWithCommandId
-
Methods inherited from interface org.javacord.api.interaction.InteractionBase
createFollowupMessageBuilder, createImmediateResponder, getApplicationId, getBotPermissions, getChannel, getLocale, getServer, getServerLocale, getToken, getUser, getVersion, respondLater, respondLater, respondWithModal, respondWithModal
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
-
-
-
Constructor Detail
-
ApplicationCommandInteractionImpl
public ApplicationCommandInteractionImpl(DiscordApiImpl api, TextChannel channel, com.fasterxml.jackson.databind.JsonNode jsonData)
Class constructor.- Parameters:
api
- The api instance.channel
- The channel in which the interaction happened. Can benull
.jsonData
- The json data of the interaction.
-
-
Method Detail
-
getType
public InteractionType getType()
- Specified by:
getType
in interfaceInteractionBase
- Specified by:
getType
in classInteractionImpl
-
getCommandId
public long getCommandId()
- Specified by:
getCommandId
in interfaceApplicationCommandInteraction
-
getCommandIdAsString
public java.lang.String getCommandIdAsString()
- Specified by:
getCommandIdAsString
in interfaceApplicationCommandInteraction
-
getCommandName
public java.lang.String getCommandName()
- Specified by:
getCommandName
in interfaceApplicationCommandInteraction
-
getRegisteredCommandServerId
public java.util.Optional<java.lang.Long> getRegisteredCommandServerId()
- Specified by:
getRegisteredCommandServerId
in interfaceApplicationCommandInteraction
-
-