Package org.javacord.api.interaction
Interface ApplicationCommandInteraction
-
- All Superinterfaces:
DiscordEntity,InteractionBase
- All Known Subinterfaces:
AutocompleteInteraction,MessageContextMenuInteraction,SlashCommandInteraction,UserContextMenuInteraction
public interface ApplicationCommandInteraction extends InteractionBase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description longgetCommandId()Gets the id of the invoked application command.java.lang.StringgetCommandIdAsString()Gets the id of the invoked application command as string.java.lang.StringgetCommandName()Gets the name of the invoked application command.default java.util.Optional<Server>getRegisteredCommandServer()Gets the server the command was registered on.java.util.Optional<java.lang.Long>getRegisteredCommandServerId()Gets the id of the server the command was registered on.-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.interaction.InteractionBase
createFollowupMessageBuilder, createImmediateResponder, getApplicationId, getBotPermissions, getChannel, getLocale, getServer, getServerLocale, getToken, getType, getUser, getVersion, respondLater, respondLater, respondWithModal, respondWithModal
-
-
-
-
Method Detail
-
getCommandId
long getCommandId()
Gets the id of the invoked application command.- Returns:
- The id of the invoked command.
-
getCommandIdAsString
java.lang.String getCommandIdAsString()
Gets the id of the invoked application command as string.- Returns:
- The id of the invoked command as string.
-
getCommandName
java.lang.String getCommandName()
Gets the name of the invoked application command.- Returns:
- The name of the invoked command.
-
getRegisteredCommandServerId
java.util.Optional<java.lang.Long> getRegisteredCommandServerId()
Gets the id of the server the command was registered on.- Returns:
- The id of the server the command was registered on.
-
getRegisteredCommandServer
default java.util.Optional<Server> getRegisteredCommandServer()
Gets the server the command was registered on.- Returns:
- The server the command was registered on.
-
-