+Moved guildrole commands to subcommand routine

This commit is contained in:
Alex
2019-06-30 03:20:46 -04:00
parent df7973b3d7
commit 392ba0e19c
73 changed files with 353 additions and 447 deletions
+40
View File
@@ -0,0 +1,40 @@
package commands.general;
import core.Command;
import core.LocStrings;
import dataStructures.*;
public class CommandRemind extends Command
{
public CommandRemind(KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String getHelpText() { return LocStrings.stub("RemindInfo"); };
@Override
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
{
long time;
try
{
time = Long.parseLong(input.args.split(" ")[0]);
}
catch(Exception e)
{
res.send("That's not a valid time");
return;
}
res.send("Ok! I'll remind you!");
try
{
Thread.sleep(time * 1000 * 60);
res.send("<@" + user.discordID + "> don't forget: " + input.args.substring(input.args.indexOf(" ")));
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
}