package stream.flarebot.flarebot.commands.secret;

import net.dv8tion.jda.core.entities.Member;
import net.dv8tion.jda.core.entities.Message;
import net.dv8tion.jda.core.entities.TextChannel;
import net.dv8tion.jda.core.entities.User;
import net.dv8tion.jda.core.exceptions.HierarchyException;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalDateTime;
import org.joda.time.Period;
import org.joda.time.format.PeriodFormatter;
import org.joda.time.format.PeriodFormatterBuilder;
import stream.flarebot.flarebot.FlareBot;
import stream.flarebot.flarebot.commands.Command;
import stream.flarebot.flarebot.commands.CommandType;
import stream.flarebot.flarebot.mod.ModlogAction;
import stream.flarebot.flarebot.mod.Punishment;
import stream.flarebot.flarebot.objects.GuildWrapper;
import stream.flarebot.flarebot.scheduler.FutureAction;
import stream.flarebot.flarebot.scheduler.Scheduler;
import stream.flarebot.flarebot.util.GeneralUtils;
import stream.flarebot.flarebot.util.MessageUtils;

import java.time.Clock;

public class TestCommand implements Command {

    @Override
    public void onCommand(User sender, GuildWrapper guild, TextChannel channel, Message message, String[] args, Member member) {
        if (args.length < 2) {
            MessageUtils.sendUsage(this, channel, sender);
        } else {
            Period period;
            if((period = GeneralUtils.getTimeFromInput(args[0], channel)) == null) return;
            String reminder = FlareBot.getMessage(args, 1);
            channel.sendMessage("\uD83D\uDC4D I will remind you in " + GeneralUtils.formatJodaTime(period) + " (at "
                    + GeneralUtils.formatPrecisely(period) + ")").queue();

            new FutureAction(guild.getGuild().getIdLong(), channel.getIdLong(), sender.getIdLong(), reminder.substring(0,
                    Math.min(reminder.length(), 1000)), period,
                    new DateTime(DateTimeZone.UTC), FutureAction.Action.REMINDER).queue();
        }
    }

    @Override
    public String getCommand() {
        return "test";
    }

    @Override
    public String getDescription() {
        return null;
    }

    @Override
    public String getUsage() {
        return "{%}test";
    }

    @Override
    public CommandType getType() {
        return CommandType.SECRET;
    }
}

@@ -1252,764 +1252,87 @@
     
-if (args.length %3C 2) %7B%0A            MessageUtils.sendUsage(this, channel, sender);%0A        %7D else %7B%0A            Period period;%0A            if((period = GeneralUtils.getTimeFromInput(args%5B0%5D, channel)) == null) return;%0A            String reminder = FlareBot.getMessage(args, 1);%0A            channel.sendMessage(%22%5CuD83D%5CuDC4D I will remind you in %22 + GeneralUtils.formatJodaTime(period) + %22 (at %22%0A                    + GeneralUtils.formatPrecisely(period) + %22)%22).queue();%0A%0A            new FutureAction(guild.getGuild().getIdLong(), channel.getIdLong(), sender.getIdLong(), reminder.substring(0,%0A                    Math.min(reminder.length(), 1000)), period,%0A                    new DateTime(DateTimeZone.UTC), FutureAction.Action.REMINDER).queue();%0A        %7D
+// Served it's purpose once again :) Now it's free to be reused... no memes pls
 %0A   

Clean test command