Class CommandInteractionImpl
- All Implemented Interfaces:
ISnowflake
,IDeferrableCallback
,IModalCallback
,IReplyCallback
,CommandInteraction
,CommandInteractionPayload
,Interaction
,CommandInteractionPayloadMixin
- Direct Known Subclasses:
ContextInteractionImpl
,SlashCommandInteractionImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAcknowledge this interaction and defer the reply to a later time.replyModal
(Modal modal) Acknowledgement of this interaction with aModal
.Methods inherited from class net.dv8tion.jda.internal.interactions.DeferrableInteractionImpl
getHook, releaseHook
Methods inherited from class net.dv8tion.jda.internal.interactions.InteractionImpl
ack, getChannel, getChannelIdLong, getContext, getEntitlements, getGuild, getIdLong, getIntegrationOwners, getJDA, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledged
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.interactions.commands.CommandInteractionPayload
getCommandId, getCommandString, getFullCommandName, getOption, getOption, getOption, getOption, getOptionsByName, getOptionsByType, isGlobalCommand
Methods inherited from interface net.dv8tion.jda.internal.interactions.command.CommandInteractionPayloadMixin
getCommandIdLong, getCommandType, getName, getOptions, getSubcommandGroup, getSubcommandName, isGuildCommand
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHook
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannel, getChannelId, getChannelIdLong, getChannelType, getContext, getEntitlements, getGuild, getGuildChannel, getGuildLocale, getIntegrationOwners, getJDA, getMember, getMessageChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, isAcknowledged, isFromAttachedGuild, isFromGuild
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IReplyCallback
deferReply, reply, reply, replyComponents, replyComponents, replyComponents, replyEmbeds, replyEmbeds, replyFiles, replyFiles, replyFormat, replyPoll
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Constructor Details
-
CommandInteractionImpl
-
-
Method Details
-
getCommandPayload
- Specified by:
getCommandPayload
in interfaceCommandInteractionPayloadMixin
-
deferReply
Description copied from interface:IReplyCallback
Acknowledge this interaction and defer the reply to a later time.
This will send a<Bot> is thinking...
message in chat that will be updated later through eitherInteractionHook.editOriginal(String)
orWebhookClient.sendMessage(String)
.You can use
deferReply(true)
to send a deferred ephemeral reply. If your initial deferred message is not ephemeral it cannot be made ephemeral later. Your first message to theInteractionHook
will inherit whether the message is ephemeral or not from this deferred reply.You only have 3 seconds to acknowledge an interaction!
When the acknowledgement is sent after the interaction expired, you will receiveErrorResponse.UNKNOWN_INTERACTION
.Use
IReplyCallback.reply(String)
to reply directly.- Specified by:
deferReply
in interfaceIReplyCallback
- Returns:
ReplyCallbackAction
-
replyModal
Description copied from interface:IModalCallback
Acknowledgement of this interaction with aModal
.This will open a popup on the target user's Discord client.
Interactions can only be acknowledged once.
You only have 3 seconds to acknowledge an interaction!
When the acknowledgement is sent after the interaction expired, you will receiveErrorResponse.UNKNOWN_INTERACTION
.- Specified by:
replyModal
in interfaceIModalCallback
- Parameters:
modal
- The Modal to send- Returns:
- ModalCallbackAction
-