Package discord4j.rest.interaction
Interface ApplicationCommandDefinition
-
@Experimental public interface ApplicationCommandDefinition
Represents an application command that can be tested against incoming interactions and to build a response sequence.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InteractionHandlercreateResponseHandler(RestInteraction interaction)Return the actual component responsible for maintaining interaction responses.booleantest(discord4j.discordjson.json.ApplicationCommandInteractionData acid)Match whether the incoming interaction can be handled by this command.
-
-
-
Method Detail
-
test
boolean test(discord4j.discordjson.json.ApplicationCommandInteractionData acid)
Match whether the incoming interaction can be handled by this command.- Parameters:
acid- the incoming interaction data- Returns:
trueif this command can handle this interaction,falseotherwise
-
createResponseHandler
InteractionHandler createResponseHandler(RestInteraction interaction)
Return the actual component responsible for maintaining interaction responses.- Parameters:
interaction- the interaction this command is handling- Returns:
- a source for responses around the given interaction
-
-