public interface Slash
ICommandEngine
that an implementation of ICommand
should be also treated
as a Slash command.
Note: Implementing this in a class that doesn't implements
ICommand
will make this implementation meaningless.
ICommand
Modifier and Type | Method and Description |
---|---|
void |
run(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@UnmodifiableView @NotNull Map<String,IArgument> args)
Command execution after all validations has been passed.
|
static void |
sendReply(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@NotNull net.dv8tion.jda.api.EmbedBuilder message)
Sends an ephemeral reply to a Slash command request.
|
static void |
sendReply(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@NotNull net.dv8tion.jda.api.EmbedBuilder message,
boolean ephemeral) |
static void |
sendReply(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@NotNull net.dv8tion.jda.api.entities.MessageEmbed message)
Sends an ephemeral reply to a Slash command request.
|
static void |
sendReply(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@NotNull net.dv8tion.jda.api.entities.MessageEmbed message,
boolean ephemeral) |
static void |
sendReply(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@NotNull String message)
Sends an ephemeral reply to a Slash command request.
|
static void |
sendReply(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@NotNull String message,
boolean ephemeral)
Sends a reply to a Slash command request.
|
static boolean |
shouldRun(@NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event,
@NotNull ICommand command)
Check if the command should be run in the current Message Channel.
|
static void sendReply(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @NotNull String message)
event
- The event that triggered this response.message
- The response message for the user.static void sendReply(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @NotNull String message, boolean ephemeral)
event
- The event that triggered this response.message
- The response message for the user.ephemeral
- True, if this message should be invisible for other users.static void sendReply(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @NotNull net.dv8tion.jda.api.EmbedBuilder message)
event
- Discord event that triggered this function callmessage
- EmbedBuilder messageEmbedBuilder
static void sendReply(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @NotNull net.dv8tion.jda.api.entities.MessageEmbed message)
event
- Discord event that triggered this function callmessage
- MessageEmbedMessageEmbed
static void sendReply(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @NotNull net.dv8tion.jda.api.EmbedBuilder message, boolean ephemeral)
event
- Discord Event that triggered this function call.message
- EmbedBuilder messageephemeral
- True, if this message should be invisible for other users.EmbedBuilder
static void sendReply(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @NotNull net.dv8tion.jda.api.entities.MessageEmbed message, boolean ephemeral)
event
- Discord Event that triggered this function call.message
- MessageEmbedephemeral
- True, if this message should be invisible for other users.MessageEmbed
static boolean shouldRun(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @NotNull ICommand command)
event
- Discord Event that triggered this function call.command
- Representation of a Slash Command as a ICommand
.void run(@NotNull @NotNull net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, @NotNull @UnmodifiableView @NotNull Map<String,IArgument> args)
event
- Discord event that triggered this command callargs
- Already parsed arguments, Map's keys are the argument's name