Merge pull request #67 from BigBotNetwork/greg-dev

Greg dev
This commit is contained in:
Skidder 2019-11-16 22:03:36 +01:00 committed by GitHub
commit f4a37e84e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 1 deletions

View file

@ -32,7 +32,7 @@ public class HelpCommand implements Command {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (int i = 0; i < entry.getValue().size(); i++) { for (int i = 0; i < entry.getValue().size(); i++) {
Command cmd = entry.getValue().get(i); Command cmd = entry.getValue().get(i);
sb.append("`" + cmd.labels()[0] + "`"); sb.append("`").append(cmd.labels()[0]).append("`");
if (i < entry.getValue().size() - 1) sb.append(", "); if (i < entry.getValue().size() - 1) sb.append(", ");
} }
String[] packagesplit = entry.getKey().split("\\."); String[] packagesplit = entry.getKey().split("\\.");

View file

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

View file

@ -24,6 +24,7 @@ public class BotList {
private static String DiscordBestBots = "https://discordsbestbots.xyz/api/bots/637002314162372639/stats"; private static String DiscordBestBots = "https://discordsbestbots.xyz/api/bots/637002314162372639/stats";
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 Config config; private Config config;
@ -130,6 +131,20 @@ public class BotList {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
// Discord Extreme List
Request discordextremelist = new Request.Builder()
.url(DiscordExtremeList)
.post(body)
.addHeader("Authorizaion", config.getDiscordExtremeListToken())
.build();
try {
new OkHttpClient().newCall(discordextremelist).execute().close();
} catch (IOException e) {
e.printStackTrace();
}
} }
} }