public interface SlashCommandActor
extends revxrsal.commands.command.CommandActor
CommandActor that originated from a slash command,
or from an auto-complete request.| Modifier and Type | Method and Description |
|---|---|
default @NotNull net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent |
autoCompleteEvent()
Returns this event as a
CommandAutoCompleteInteractionEvent if it is from a
slash command, otherwise throws a IllegalArgumentException. |
default @Nullable net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent |
autoCompleteEventOrNull()
Returns this event as a
CommandAutoCompleteInteractionEvent if it is from an
auto-complete events, otherwise returns null. |
default @NotNull net.dv8tion.jda.api.entities.channel.middleman.MessageChannel |
channel()
Returns the
MessageChannel that this interaction ocurred in |
default @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent |
commandEvent()
Returns this event as a
SlashCommandInteractionEvent if it is from a
slash command, otherwise throws a IllegalArgumentException. |
default @Nullable net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent |
commandEventOrNull()
Returns this event as a
SlashCommandInteractionEvent if it is from a
slash command, otherwise returns null. |
default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction |
deferReply()
Acknowledge this interaction and defer the reply to a later time.
|
default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction |
deferReply(boolean ephemeral)
Acknowledge this interaction and defer the reply to a later time.
|
@NotNull net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent |
event()
Returns the underlying event
|
default @NotNull net.dv8tion.jda.api.entities.Guild |
guild()
Returns the guild the command was executed in, otherwise throws
a
GuildOnlyCommandException |
default @Nullable net.dv8tion.jda.api.entities.Guild |
guildOrNull()
Returns the guild the command was executed in, otherwise returns
null |
default @NotNull net.dv8tion.jda.api.interactions.InteractionHook |
hook()
The
InteractionHook which can be used to send deferred replies or followup messages. |
default @NotNull net.dv8tion.jda.api.JDA |
jda()
Returns the JDA instance
|
revxrsal.commands.Lamp<SlashCommandActor> |
lamp()
Returns the
Lamp instance that constructed this actor. |
default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction |
replyToInteraction(@NotNull net.dv8tion.jda.api.utils.messages.MessageCreateData content)
Reply to this interaction and acknowledge it.
|
default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction |
replyToInteraction(@NotNull java.lang.String content)
Reply to this interaction and acknowledge it.
|
default @NotNull net.dv8tion.jda.api.entities.SelfUser |
selfUser()
Returns the currently logged-in user
|
@NotNull net.dv8tion.jda.api.entities.User |
user()
Returns the underlying
User |
@NotNull @NotNull net.dv8tion.jda.api.entities.User user()
UserUser@NotNull @NotNull net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent event()
@NotNull default @NotNull net.dv8tion.jda.api.JDA jda()
@NotNull default @NotNull net.dv8tion.jda.api.entities.SelfUser selfUser()
SelfUser@Nullable default @Nullable net.dv8tion.jda.api.entities.Guild guildOrNull()
nullnull if not in a guild.@NotNull default @NotNull net.dv8tion.jda.api.entities.Guild guild()
GuildOnlyCommandExceptionGuildOnlyCommandException - if not in a guild@NotNull default @NotNull net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel()
MessageChannel that this interaction ocurred in@NotNull default @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent commandEvent()
SlashCommandInteractionEvent if it is from a
slash command, otherwise throws a IllegalArgumentException.SlashCommandInteractionEventjava.lang.IllegalArgumentException - if it is not a SlashCommandInteractionEvent@Nullable default @Nullable net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent commandEventOrNull()
SlashCommandInteractionEvent if it is from a
slash command, otherwise returns null.SlashCommandInteractionEvent, or null.@NotNull default @NotNull net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent autoCompleteEvent()
CommandAutoCompleteInteractionEvent if it is from a
slash command, otherwise throws a IllegalArgumentException.CommandAutoCompleteInteractionEventjava.lang.IllegalArgumentException - if it is not a CommandAutoCompleteInteractionEvent@Nullable default @Nullable net.dv8tion.jda.api.events.interaction.command.CommandAutoCompleteInteractionEvent autoCompleteEventOrNull()
CommandAutoCompleteInteractionEvent if it is from an
auto-complete events, otherwise returns null.CommandAutoCompleteInteractionEvent, or null.@CheckReturnValue
@Contract(pure=true)
default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction replyToInteraction(@NotNull
@NotNull java.lang.String content)
content - The message content to sendReplyCallbackActionIReplyCallback.reply(String)@CheckReturnValue
@Contract(pure=true)
default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction replyToInteraction(@NotNull
@NotNull net.dv8tion.jda.api.utils.messages.MessageCreateData content)
content - The message content to sendReplyCallbackActionIReplyCallback.reply(String)@CheckReturnValue @Contract(pure=true) default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction deferReply(boolean ephemeral)
<Bot> is thinking... message in chat that will be updated later through either InteractionHook.editOriginal(String) or WebhookClient.sendMessage(String).ephemeral - True, if this message should only be visible to the interaction userReplyCallbackActionIReplyCallback.deferReply(boolean)@CheckReturnValue @Contract(pure=true) default net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction deferReply()
<Bot> is thinking... message in chat that will be updated later through either InteractionHook.editOriginal(String) or WebhookClient.sendMessage(String).ReplyCallbackActionIReplyCallback.deferReply()@CheckReturnValue @Contract(pure=true) @NotNull default @NotNull net.dv8tion.jda.api.interactions.InteractionHook hook()
InteractionHook which can be used to send deferred replies or followup messages.revxrsal.commands.Lamp<SlashCommandActor> lamp()
Lamp instance that constructed this actor.lamp in interface revxrsal.commands.command.CommandActor