Discord Bot Reviews #82

Merged
greg6775 merged 1 commit from greg-dev into master 2019-11-21 20:31:28 +01:00
2 changed files with 20 additions and 0 deletions
Showing only changes of commit f59d66a65f - Show all commits

View file

@ -121,4 +121,8 @@ public class Config {
public String getDiscordExtremeListToken() {
return config.getJSONObject("Tokens").getString("DiscordExtremeList");
}
public String getDiscordBotReviewsToken() {
return config.getJSONObject("Tokens").getString("DiscordBotReviews");
}
}

View file

@ -25,6 +25,7 @@ public class BotList {
private static String DiscordBoats = "https://discord.boats/api/bot/637002314162372639";
private static String YetAnotherBotList = "https://yabl.xyz/api/bot/637002314162372639/stats";
private static String DiscordExtremeList = "https://discordextremelist.xyz/api/bot/637002314162372639";
private static String DiscordBotReviews = "https://discordbotreviews.xyz/api/bot/637002314162372639/stats";
private Config config;
@ -146,6 +147,21 @@ public class BotList {
} catch (IOException e) {
e.printStackTrace();
}
// Discord Bot Reviews
Request discordbotreviews = new Request.Builder()
.url(DiscordBotReviews)
.post(body)
.addHeader("Authorizaion", config.getDiscordBotReviewsToken())
.build();
try {
new OkHttpClient().newCall(discordbotreviews).execute().close();
System.out.println("Successfully posted count to Discord Bot Reviews!");
} catch (IOException e) {
e.printStackTrace();
}
}
}