Discord Bot Reviews

This commit is contained in:
GregTCLTK 2019-11-21 11:29:47 -08:00
parent 971f6f422d
commit f59d66a65f
No known key found for this signature in database
GPG key ID: A91BADE5C070FF67
2 changed files with 20 additions and 0 deletions

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();
}
}
}