mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-04 16:45:44 +00:00
[AB-xxx] adding ability to track emotes used in reactions
adding ability to have confirmations for slash commands
This commit is contained in:
@@ -15,7 +15,8 @@ public interface InteractionService {
|
||||
CompletableFuture<InteractionHook> replyString(String text, IReplyCallback callback);
|
||||
CompletableFuture<InteractionHook> replyEmbed(String templateKey, IReplyCallback callback);
|
||||
List<CompletableFuture<Message>> sendEmbed(String templateKey, InteractionHook interactionHook);
|
||||
CompletableFuture<Message> editOriginal(MessageToSend messageToSend, InteractionHook interactionHook);
|
||||
CompletableFuture<Message> replaceOriginal(MessageToSend messageToSend, InteractionHook interactionHook);
|
||||
CompletableFuture<Message> replaceOriginal(String template, Object model, InteractionHook interactionHook);
|
||||
CompletableFuture<InteractionHook> replyMessageToSend(MessageToSend messageToSend, IReplyCallback callback);
|
||||
CompletableFuture<InteractionHook> replyMessage(String templateKey, Object model, IReplyCallback callback);
|
||||
CompletableFuture<Message> replyString(String content, InteractionHook interactionHook);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package dev.sheldan.abstracto.core.interaction.slash;
|
||||
|
||||
import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
|
||||
import dev.sheldan.abstracto.core.command.execution.CommandResult;
|
||||
import net.dv8tion.jda.api.entities.Guild;
|
||||
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
|
||||
import net.dv8tion.jda.api.interactions.commands.Command;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.SlashCommandData;
|
||||
import org.springframework.data.util.Pair;
|
||||
@@ -16,4 +18,6 @@ public interface SlashCommandService {
|
||||
CompletableFuture<Void> deleteGuildSlashCommands(Guild guild, List<Long> slashCommandId, List<Long> commandInServerIdsToUnset);
|
||||
CompletableFuture<Void> addGuildSlashCommands(Guild guild, List<Pair<List<CommandConfiguration>, SlashCommandData>> commandData);
|
||||
void storeCreatedSlashCommands(Guild guild, List<Pair<List<CommandConfiguration>, SlashCommandData>> commandData, List<Command> createdCommands);
|
||||
CompletableFuture<CommandResult> completeConfirmableCommand(SlashCommandInteractionEvent event, String template);
|
||||
CompletableFuture<CommandResult> completeConfirmableCommand(SlashCommandInteractionEvent event, String template, Object parameter);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package dev.sheldan.abstracto.core.interaction.slash.parameter;
|
||||
|
||||
import dev.sheldan.abstracto.core.command.config.Parameter;
|
||||
import dev.sheldan.abstracto.core.models.database.AEmote;
|
||||
import net.dv8tion.jda.api.entities.Guild;
|
||||
import net.dv8tion.jda.api.entities.emoji.Emoji;
|
||||
import net.dv8tion.jda.api.interactions.commands.CommandInteractionPayload;
|
||||
import net.dv8tion.jda.api.interactions.commands.OptionType;
|
||||
@@ -16,8 +17,8 @@ public interface SlashCommandParameterService {
|
||||
Object getCommandOption(String name, CommandInteractionPayload event);
|
||||
Boolean hasCommandOption(String name, CommandInteractionPayload event);
|
||||
Boolean hasCommandOptionWithFullType(String name, CommandInteractionPayload event, OptionType optionType);
|
||||
AEmote loadAEmoteFromString(String input, CommandInteractionPayload event);
|
||||
Emoji loadEmoteFromString(String input, CommandInteractionPayload event);
|
||||
AEmote loadAEmoteFromString(String input, Guild guild);
|
||||
Emoji loadEmoteFromString(String input, Guild guild);
|
||||
List<OptionType> getTypesFromParameter(Parameter parameter);
|
||||
List<OptionType> getTypesFromParameter(Class clazz);
|
||||
String getFullQualifiedParameterName(String name, OptionType type);
|
||||
|
||||
Reference in New Issue
Block a user