master -> greg dev #93

Merged
greg6775 merged 16 commits from master into greg-dev 2019-11-22 23:41:43 +01:00
2 changed files with 20 additions and 0 deletions
Showing only changes of commit f58b4e596c - Show all commits

View file

@ -121,4 +121,8 @@ public class Config {
public String getDiscordExtremeListToken() { public String getDiscordExtremeListToken() {
return config.getJSONObject("Tokens").getString("DiscordExtremeList"); 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 DiscordBoats = "https://discord.boats/api/bot/637002314162372639";
private static String YetAnotherBotList = "https://yabl.xyz/api/bot/637002314162372639/stats"; private static String YetAnotherBotList = "https://yabl.xyz/api/bot/637002314162372639/stats";
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 Config config; private Config config;
@ -146,6 +147,21 @@ public class BotList {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); 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();
}
} }
} }