@@ -191,6 +191,7 @@
|
|||||||
"Localized Strings","MusicInfo",""
|
"Localized Strings","MusicInfo",""
|
||||||
"Localized Strings","MusicVolChanged","Volume set to %s!"
|
"Localized Strings","MusicVolChanged","Volume set to %s!"
|
||||||
"Localized Strings","MusicVolCurrent","Volume is at %s!"
|
"Localized Strings","MusicVolCurrent","Volume is at %s!"
|
||||||
|
"Localized Strings","MusicVolOOB",""
|
||||||
"Localized Strings","PerishInfo","Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you mentioned"
|
"Localized Strings","PerishInfo","Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you mentioned"
|
||||||
"Localized Strings","PingInfo","Will respond with Pong!"
|
"Localized Strings","PingInfo","Will respond with Pong!"
|
||||||
"Localized Strings","PingResponse","Pong!"
|
"Localized Strings","PingResponse","Pong!"
|
||||||
|
|||||||
|
@@ -24,13 +24,8 @@ public class CommandE6 extends Command
|
|||||||
@Override
|
@Override
|
||||||
public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
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.contentRating == KittyRating.Filtered)
|
||||||
{
|
{
|
||||||
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");
|
image = searcher.getE6(input.args + " rating:safe");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -43,7 +38,7 @@ public class CommandE6 extends Command
|
|||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(response.authorText == null)
|
if(response.bodyImageURL == null)
|
||||||
{
|
{
|
||||||
Exception e = new Exception();
|
Exception e = new Exception();
|
||||||
throw e;
|
throw e;
|
||||||
|
|||||||
@@ -77,17 +77,22 @@ public class NetworkE6
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
for(int i = 0; i < imageObj.length; ++i)
|
for(int i = 0; i < imageObj.length; ++i)
|
||||||
{
|
{
|
||||||
|
String [] TagsList = imageObj[i].tags.split(" ");
|
||||||
blacklisted = false;
|
blacklisted = false;
|
||||||
for(int j = 0; j < blacklist.length; j++)
|
for(int j = 0; j < blacklist.length; j++)
|
||||||
{
|
{
|
||||||
if(imageObj[i].tags.contains(blacklist[j]))
|
for(int k = 0; k < TagsList.length; k ++)
|
||||||
|
{
|
||||||
|
if(TagsList[k].equals(blacklist[j]))
|
||||||
{
|
{
|
||||||
System.out.println("BLACKLISTED " + blacklist[j]);
|
System.out.println("BLACKLISTED " + blacklist[j]);
|
||||||
blacklisted = true;
|
blacklisted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(blacklisted)
|
if(blacklisted)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import utils.HTTPUtils;
|
|||||||
public class NetworkSauceNAO
|
public class NetworkSauceNAO
|
||||||
{
|
{
|
||||||
private static final Gson jsonParser_ = new Gson();
|
private static final Gson jsonParser_ = new Gson();
|
||||||
private static final String API_ROOT = "https://saucenao.com/search.php?db=999&output_type=2&numres=10&api_key=" + Ref.SauceNAOKey +"&url=";
|
private static final String API_ROOT = "https://saucenao.com/search.php?dbmask=268435456&output_type=2&numres=10&api_key=" + Ref.SauceNAOKey +"&url=";
|
||||||
NetworkE6 e6Sauce = new NetworkE6();
|
NetworkE6 e6Sauce = new NetworkE6();
|
||||||
private class SauceNAOResponseObject
|
private class SauceNAOResponseObject
|
||||||
{
|
{
|
||||||
@@ -40,6 +40,7 @@ public class NetworkSauceNAO
|
|||||||
if(sauceUrl.startsWith("https://e621.net/post/show/"))
|
if(sauceUrl.startsWith("https://e621.net/post/show/"))
|
||||||
{
|
{
|
||||||
System.out.println("id:" + sauceUrl.substring(26));
|
System.out.println("id:" + sauceUrl.substring(26));
|
||||||
|
System.out.println("HERE");
|
||||||
return e6Sauce.getE6("id:" + sauceUrl.substring(27)).toString();
|
return e6Sauce.getE6("id:" + sauceUrl.substring(27)).toString();
|
||||||
}
|
}
|
||||||
return sauce.results.get(0).data.ext_urls[0];
|
return sauce.results.get(0).data.ext_urls[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user