
net.neoforged.camelot.commands.utility.RemindCommand Maven / Gradle / Ivy
package net.neoforged.camelot.commands.utility;
import com.jagrosh.jdautilities.command.CooldownScope;
import com.jagrosh.jdautilities.command.SlashCommand;
import com.jagrosh.jdautilities.command.SlashCommandEvent;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.channel.ChannelType;
import net.dv8tion.jda.api.interactions.Interaction;
import net.dv8tion.jda.api.interactions.commands.OptionMapping;
import net.dv8tion.jda.api.interactions.commands.OptionType;
import net.dv8tion.jda.api.interactions.commands.build.OptionData;
import net.dv8tion.jda.api.utils.TimeFormat;
import net.dv8tion.jda.api.utils.messages.MessageEditBuilder;
import net.dv8tion.jda.api.utils.messages.MessageEditData;
import net.neoforged.camelot.BotMain;
import net.neoforged.camelot.Database;
import net.neoforged.camelot.commands.PaginatableCommand;
import net.neoforged.camelot.db.schemas.Reminder;
import net.neoforged.camelot.db.transactionals.RemindersDAO;
import net.neoforged.camelot.listener.DismissListener;
import net.neoforged.camelot.util.DateUtils;
import java.time.Instant;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
public class RemindCommand extends SlashCommand {
public RemindCommand() {
this.name = "remind";
this.help = "Reminder-related commands";
this.children = new SlashCommand[] {
new In(), new ListCmd(), new Delete()
};
}
/**
* Command used to schedule a reminder.
*/
private static final class In extends SlashCommand {
private In() {
this.name = "in";
this.help = "Adds a reminder relative to the current time";
options = List.of(
new OptionData(OptionType.STRING, "time", "The relative time of the reminder. The format is:
© 2015 - 2025 Weber Informatics LLC | Privacy Policy