From bb3fa0607edd3da03deb51ba8bf14309450b718f Mon Sep 17 00:00:00 2001 From: condolent Date: Sun, 26 Apr 2020 22:19:57 +0200 Subject: [PATCH] Top.GG API publish --- pom.xml | 2 +- src/main/java/com/jonteohr/discord/guardian/App.java | 8 ++++---- .../com/jonteohr/discord/guardian/events/GuildLeave.java | 3 ++- .../com/jonteohr/discord/guardian/events/GuildReady.java | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 36e08b3..41f70e3 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.jonteohr.discord guardian - 1.0.2_6 + 1.0.2_7 guardian diff --git a/src/main/java/com/jonteohr/discord/guardian/App.java b/src/main/java/com/jonteohr/discord/guardian/App.java index 8d81723..0581e89 100644 --- a/src/main/java/com/jonteohr/discord/guardian/App.java +++ b/src/main/java/com/jonteohr/discord/guardian/App.java @@ -44,10 +44,10 @@ public static void main(String[] args) throws LoginException { .setStatus(OnlineStatus.ONLINE) .build(); -// dbl = new DiscordBotListAPI.Builder() -// .token(prop.loadProperty("apiToken")) -// .botId("701037124996169738") -// .build(); + dbl = new DiscordBotListAPI.Builder() + .token(prop.loadProperty("apiToken")) + .botId("701037124996169738") + .build(); // Commands jda.addEventListener(new ProtectChannel()); diff --git a/src/main/java/com/jonteohr/discord/guardian/events/GuildLeave.java b/src/main/java/com/jonteohr/discord/guardian/events/GuildLeave.java index 5097360..c3eb0d8 100644 --- a/src/main/java/com/jonteohr/discord/guardian/events/GuildLeave.java +++ b/src/main/java/com/jonteohr/discord/guardian/events/GuildLeave.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.List; +import com.jonteohr.discord.guardian.App; import com.jonteohr.discord.guardian.sql.Query; import net.dv8tion.jda.api.events.guild.GuildLeaveEvent; @@ -31,6 +32,6 @@ public void onGuildLeave(GuildLeaveEvent e) { System.out.println("Removed.."); } -// App.dbl.setStats(App.jda.getGuilds().size()); // Send stats to Top.GG + App.dbl.setStats(App.jda.getGuilds().size()); // Send stats to Top.GG } } diff --git a/src/main/java/com/jonteohr/discord/guardian/events/GuildReady.java b/src/main/java/com/jonteohr/discord/guardian/events/GuildReady.java index f123e2f..96b9ed4 100644 --- a/src/main/java/com/jonteohr/discord/guardian/events/GuildReady.java +++ b/src/main/java/com/jonteohr/discord/guardian/events/GuildReady.java @@ -22,13 +22,13 @@ public class GuildReady extends ListenerAdapter { public void onGuildReady(GuildReadyEvent e) { joinedGuild(e.getGuild(), e.getJDA()); -// App.dbl.setStats(App.jda.getGuilds().size()); // Send stats to Top.GG + App.dbl.setStats(App.jda.getGuilds().size()); // Send stats to Top.GG } public void onGuildJoin(GuildJoinEvent e) { joinedGuild(e.getGuild(), e.getJDA()); -// App.dbl.setStats(App.jda.getGuilds().size()); // Send stats to Top.GG + App.dbl.setStats(App.jda.getGuilds().size()); // Send stats to Top.GG } private void joinedGuild(Guild guild, JDA jda) {