Initial Commit

Initial commit of project.
This commit is contained in:
Alex Stewart
2019-03-09 01:21:44 -08:00
parent e54e9653ed
commit 13420951b1
124 changed files with 5883 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
package commands;
import core.Command;
import dataStructures.KittyChannel;
import dataStructures.KittyGuild;
import dataStructures.KittyRating;
import dataStructures.KittyRole;
import dataStructures.KittyUser;
import dataStructures.Response;
import dataStructures.UserInput;
public class CommandRating extends Command
{
public CommandRating(KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String HelpText() { return "'0' is fully sfw (Derpi and e621 searches are disabled), '1' is filtered (kitty auto appends a sfw tag on any searches), '2' is nsfw (any search will go through). Some other words are supported for setting filter as well."; }
// Called when the command is run!
@Override
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
{
String newRating = null;
switch(input.args.toLowerCase().trim())
{
case "0":
case "sfw":
case "safe":
case "clean":
case "work":
case "safeforwork":
guild.contentRating = KittyRating.Safe;
newRating = "Safe";
break;
case "1":
case "questionable":
case "intermediate":
case "middle":
case "search filter":
case "filter":
case "filtered":
guild.contentRating = KittyRating.Filtered;
newRating = "Filtered";
break;
case "2":
case "rude":
case "nsfw":
case "explicit":
case "lewd":
case "notsafeforwork":
guild.contentRating = KittyRating.Explicit;
newRating = "Explicit";
break;
}
if(newRating != null)
res.Call("Kittybot content set to " + newRating);
else
res.Call("Invalid content rating `" + input.args + "`");
if(newRating.equals("Filtered"))
res.Call("Warning: NSFW may slip through, images are only based on tags on their respective sites!");
}
}