Package me.s3ns3iw00.jcommands
Class CommandResponder
- java.lang.Object
-
- me.s3ns3iw00.jcommands.CommandResponder
-
public class CommandResponder extends java.lang.Object
A class that takes methods out fromSlashCommandInteraction
that are to respond to a commandCommandHandler
returns it with various events to be able to respond them
-
-
Constructor Summary
Constructors Constructor Description CommandResponder(org.javacord.api.interaction.SlashCommandInteraction interaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.javacord.api.interaction.callback.InteractionFollowupMessageBuilder
followUp()
Creates a followup message builder to send the final result of late responsejava.util.concurrent.CompletableFuture<org.javacord.api.interaction.callback.InteractionOriginalResponseUpdater>
respondLater()
Creates an updater that listens for the response In this case a waiting message can be sent to the user NOTE: Late responses need to be sent within 15 minutes, otherwise Discord drops itjava.util.concurrent.CompletableFuture<org.javacord.api.interaction.callback.InteractionOriginalResponseUpdater>
respondLaterEphemeral()
Creates an ephemeral updater that listens for the response In this case a waiting message can be sent to the user NOTE: Late responses need to be sent within 15 minutes, otherwise Discord drops itorg.javacord.api.interaction.callback.InteractionImmediateResponseBuilder
respondNow()
Creates a responder to respond immediately to the commandjava.util.concurrent.CompletableFuture<java.lang.Void>
respondWithModal(java.lang.String customId, java.lang.String title, java.util.List<org.javacord.api.entity.message.component.HighLevelComponent> highLevelComponents)
Creates a responder to respond with a modal to the commandjava.util.concurrent.CompletableFuture<java.lang.Void>
respondWithModal(java.lang.String customId, java.lang.String title, org.javacord.api.entity.message.component.HighLevelComponent... highLevelComponents)
Creates a responder to respond with a modal to the command
-
-
-
Method Detail
-
respondLater
public java.util.concurrent.CompletableFuture<org.javacord.api.interaction.callback.InteractionOriginalResponseUpdater> respondLater()
Creates an updater that listens for the response In this case a waiting message can be sent to the user NOTE: Late responses need to be sent within 15 minutes, otherwise Discord drops it- Returns:
- the response updater
-
respondLaterEphemeral
public java.util.concurrent.CompletableFuture<org.javacord.api.interaction.callback.InteractionOriginalResponseUpdater> respondLaterEphemeral()
Creates an ephemeral updater that listens for the response In this case a waiting message can be sent to the user NOTE: Late responses need to be sent within 15 minutes, otherwise Discord drops it- Returns:
- the response updater
-
respondNow
public org.javacord.api.interaction.callback.InteractionImmediateResponseBuilder respondNow()
Creates a responder to respond immediately to the command- Returns:
- the immediate responder builder
-
followUp
public org.javacord.api.interaction.callback.InteractionFollowupMessageBuilder followUp()
Creates a followup message builder to send the final result of late response- Returns:
- the followup message builder
-
respondWithModal
public java.util.concurrent.CompletableFuture<java.lang.Void> respondWithModal(java.lang.String customId, java.lang.String title, org.javacord.api.entity.message.component.HighLevelComponent... highLevelComponents)
Creates a responder to respond with a modal to the command- Returns:
- the
CompletableFuture
that completes when the modal is opened
-
respondWithModal
public java.util.concurrent.CompletableFuture<java.lang.Void> respondWithModal(java.lang.String customId, java.lang.String title, java.util.List<org.javacord.api.entity.message.component.HighLevelComponent> highLevelComponents)
Creates a responder to respond with a modal to the command- Returns:
- the
CompletableFuture
that completes when the modal is opened
-
-