Auto stash before merge of "master" and "origin/master"
This commit is contained in:
@@ -20,7 +20,7 @@ public class CommandBetBeans extends Command
|
||||
{
|
||||
String call = "";
|
||||
|
||||
int min = 50;
|
||||
int min = 20;
|
||||
int bet = 0;
|
||||
int win = 0;
|
||||
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
package commands.general;
|
||||
|
||||
import core.Command;
|
||||
import core.LocStrings;
|
||||
import dataStructures.KittyChannel;
|
||||
import dataStructures.KittyEmbed;
|
||||
import dataStructures.KittyGuild;
|
||||
import dataStructures.KittyRating;
|
||||
import dataStructures.KittyRole;
|
||||
import dataStructures.KittyUser;
|
||||
import dataStructures.Response;
|
||||
import dataStructures.UserInput;
|
||||
import network.NetworkDerpi;
|
||||
|
||||
public class CommandDerpi extends Command
|
||||
{
|
||||
NetworkDerpi searcher = new NetworkDerpi();
|
||||
KittyEmbed response;
|
||||
|
||||
// Required constructor
|
||||
public CommandDerpi(KittyRole level, KittyRating rating) { super(level, rating); }
|
||||
|
||||
@Override
|
||||
public String getHelpText() { return "Will search derpibooru for the tags entered, if KittyBot's content filter allows it"; }
|
||||
|
||||
@Override
|
||||
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||
{
|
||||
if(guild.contentRating == KittyRating.Filtered)
|
||||
{
|
||||
try
|
||||
{
|
||||
response = searcher.getDerpi(input.args.replace(',', ' ') + " safe").output();
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("DerpiError"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(input.args == null || input.args.length() == 0)
|
||||
res.send("DerpiNoSearchError");
|
||||
else
|
||||
{
|
||||
response = searcher.getDerpi(input.args).output();
|
||||
try
|
||||
{
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("DerpiError"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(input.args.startsWith("ID:"))
|
||||
{
|
||||
response = searcher.getDerpiByID(input.args.substring(input.args.indexOf(':'))).output();
|
||||
try
|
||||
{
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("DerpiError"));
|
||||
}
|
||||
}
|
||||
}
|
||||
package commands.general;
|
||||
|
||||
import core.Command;
|
||||
import core.LocStrings;
|
||||
import dataStructures.KittyChannel;
|
||||
import dataStructures.KittyEmbed;
|
||||
import dataStructures.KittyGuild;
|
||||
import dataStructures.KittyRating;
|
||||
import dataStructures.KittyRole;
|
||||
import dataStructures.KittyUser;
|
||||
import dataStructures.Response;
|
||||
import dataStructures.UserInput;
|
||||
import network.NetworkDerpi;
|
||||
|
||||
public class CommandDerpi extends Command
|
||||
{
|
||||
NetworkDerpi searcher = new NetworkDerpi();
|
||||
KittyEmbed response;
|
||||
|
||||
// Required constructor
|
||||
public CommandDerpi(KittyRole level, KittyRating rating) { super(level, rating); }
|
||||
|
||||
@Override
|
||||
public String getHelpText() { return "Will search derpibooru for the tags entered, if KittyBot's content filter allows it"; }
|
||||
|
||||
@Override
|
||||
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||
{
|
||||
if(guild.contentRating == KittyRating.Filtered)
|
||||
{
|
||||
try
|
||||
{
|
||||
response = searcher.getDerpi(input.args.replace(',', ' ') + " safe").output();
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("DerpiError"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(input.args == null || input.args.length() == 0)
|
||||
res.send("DerpiNoSearchError");
|
||||
else
|
||||
{
|
||||
response = searcher.getDerpi(input.args).output();
|
||||
try
|
||||
{
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("DerpiError"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(input.args.startsWith("ID:"))
|
||||
{
|
||||
response = searcher.getDerpiByID(input.args.substring(input.args.indexOf(':'))).output();
|
||||
try
|
||||
{
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("DerpiError"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,60 +1,76 @@
|
||||
package commands.general;
|
||||
|
||||
import core.Command;
|
||||
import core.LocStrings;
|
||||
import dataStructures.*;
|
||||
import network.NetworkE6;
|
||||
|
||||
public class CommandE6 extends Command
|
||||
{
|
||||
NetworkE6 searcher = new NetworkE6();
|
||||
KittyEmbed response;
|
||||
|
||||
public CommandE6(KittyRole level, KittyRating rating) { super(level, rating); }
|
||||
|
||||
@Override
|
||||
public String getHelpText()
|
||||
{
|
||||
String toRet = "Will search e6";
|
||||
toRet += "21 for the tags entered, if KittyBot's content filter allows it";
|
||||
return toRet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||
{
|
||||
if(guild.contentRating == KittyRating.Filtered || !guild.channels.get(Long.getLong(channel.uniqueID)).mature)
|
||||
{
|
||||
if(!guild.channels.get(Long.getLong(channel.uniqueID)).mature)
|
||||
{
|
||||
res.send("This channel is SFW only! Have some (probably) wholesome content ^^~");
|
||||
}
|
||||
response = searcher.getE6(input.args + " rating:safe").output();
|
||||
try
|
||||
{
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("E6Blacklisted"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(input.args == null || input.args.length() == 0)
|
||||
res.send("E6NoSearchError");
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
response = searcher.getE6(input.args).output();
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("E6Blacklisted"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
package commands.general;
|
||||
|
||||
import core.Command;
|
||||
import core.LocStrings;
|
||||
import dataStructures.*;
|
||||
import network.NetworkE6;
|
||||
|
||||
public class CommandE6 extends Command
|
||||
{
|
||||
NetworkE6 searcher = new NetworkE6();
|
||||
KittyEmbed response;
|
||||
GenericImage image;
|
||||
|
||||
public CommandE6(KittyRole level, KittyRating rating) { super(level, rating); }
|
||||
|
||||
@Override
|
||||
public String getHelpText()
|
||||
{
|
||||
String toRet = "Will search e6";
|
||||
toRet += "21 for the tags entered, if KittyBot's content filter allows it";
|
||||
return toRet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||
{
|
||||
if(guild.contentRating == KittyRating.Filtered || !guild.channels.get(Long.getLong(channel.uniqueID)).mature)
|
||||
{
|
||||
if(!guild.channels.get(Long.getLong(channel.uniqueID)).mature)
|
||||
{
|
||||
res.send("This channel is SFW only! Have some (probably) wholesome content ^^~");
|
||||
}
|
||||
|
||||
image = searcher.getE6(input.args + " rating:safe");
|
||||
try
|
||||
{
|
||||
response = image.output();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("E6Blacklisted"));
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
if(response.authorText == null)
|
||||
{
|
||||
Exception e = new Exception();
|
||||
throw e;
|
||||
}
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("E6Blacklisted"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(input.args == null || input.args.length() == 0)
|
||||
res.send("E6NoSearchError");
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
response = searcher.getE6(input.args).output();
|
||||
res.send(response);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
res.send(LocStrings.stub("E6Blacklisted"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user