New BotList #117
2 changed files with 20 additions and 1 deletions
|
|
@ -137,4 +137,8 @@ public class Config {
|
||||||
public String getDiscordBotsToken() {
|
public String getDiscordBotsToken() {
|
||||||
return config.getJSONObject("Tokens").getString("DiscordBots");
|
return config.getJSONObject("Tokens").getString("DiscordBots");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBotListSpaceToken() {
|
||||||
|
return config.getJSONObject("Tokens").getString("BotListSpace");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ public class BotList {
|
||||||
private static String DiscordExtremeList = "https://discordextremelist.xyz/api/bot/637002314162372639";
|
private static String DiscordExtremeList = "https://discordextremelist.xyz/api/bot/637002314162372639";
|
||||||
private static String DiscordBotReviews = "https://discordbotreviews.xyz/api/bot/637002314162372639/stats";
|
private static String DiscordBotReviews = "https://discordbotreviews.xyz/api/bot/637002314162372639/stats";
|
||||||
private static String DiscordBots = "https://top.gg/api/bots/637002314162372639/stats";
|
private static String DiscordBots = "https://top.gg/api/bots/637002314162372639/stats";
|
||||||
|
private static String BotListSpace = "https://api.botlist.space/v1/bots/:637002314162372639";
|
||||||
|
|
||||||
private Config config;
|
private Config config;
|
||||||
|
|
||||||
|
|
@ -179,7 +180,21 @@ public class BotList {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// BotListSpace
|
||||||
|
|
||||||
|
Request botlistspace = new Request.Builder()
|
||||||
|
.url(BotListSpace)
|
||||||
|
.post(body)
|
||||||
|
.addHeader("Authorization", config.getBotListSpaceToken())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
try {
|
||||||
|
new OkHttpClient().newCall(botlistspace).execute().close();
|
||||||
|
System.out.println("Successfully posted count to BotList.Space!");
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue