Class SlashCommandInteractionEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent
net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent
- All Implemented Interfaces:
ISnowflake,GenericEvent,IDeferrableCallback,IReplyCallback,CommandInteraction,CommandInteractionPayload,SlashCommandInteraction,Interaction
public class SlashCommandInteractionEvent
extends GenericCommandInteractionEvent
implements SlashCommandInteraction
Indicates that a slash command was used in a
MessageChannel.
Requirements
To receive these events, you must unset the Interactions Endpoint URL in your application dashboard. You can simply remove the URL for this endpoint in your settings at the Discord Developers Portal.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSlashCommandInteractionEvent(JDA api, long responseNumber, SlashCommandInteraction interaction) -
Method Summary
Modifier and TypeMethodDescriptionThe channel this interaction happened in.TheInteractioninstance.Methods inherited from class net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent
deferReply, getCommandIdLong, getCommandType, getHook, getName, getOptions, getSubcommandGroup, getSubcommandNameMethods inherited from class net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
getGuild, getGuildLocale, getIdLong, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledgedMethods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumberMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.dv8tion.jda.api.interactions.commands.CommandInteractionPayload
getCommandId, getCommandIdLong, getCommandPath, getCommandString, getCommandType, getName, getOption, getOptions, getOptionsByName, getOptionsByType, getSubcommandGroup, getSubcommandNameMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHookMethods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelType, getGuild, getGuildLocale, getJDA, getMember, getMessageChannel, getNewsChannel, getPrivateChannel, getTextChannel, getThreadChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, getVoiceChannel, isAcknowledged, isFromGuildMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IReplyCallback
deferReply, deferReply, reply, reply, replyEmbeds, replyEmbeds, replyFile, replyFile, replyFile, replyFile, replyFormatMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreatedMethods inherited from interface net.dv8tion.jda.api.interactions.commands.SlashCommandInteraction
getGuildChannel
-
Constructor Details
-
SlashCommandInteractionEvent
public SlashCommandInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull SlashCommandInteraction interaction)
-
-
Method Details
-
getInteraction
Description copied from class:GenericInteractionCreateEventTheInteractioninstance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteractionin classGenericCommandInteractionEvent- Returns:
- The
Interaction
-
getChannel
Description copied from interface:InteractionThe channel this interaction happened in.
This is currently never null, but might be nullable in the future.- Specified by:
getChannelin interfaceInteraction- Specified by:
getChannelin interfaceSlashCommandInteraction- Overrides:
getChannelin classGenericInteractionCreateEvent- Returns:
- The channel or null if this interaction is not from a channel context
-