Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
Top.GG API publish
Browse files Browse the repository at this point in the history
  • Loading branch information
jonteohr committed Apr 26, 2020
1 parent fab7cb4 commit bb3fa06
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.jonteohr.discord</groupId>
<artifactId>guardian</artifactId>
<version>1.0.2_6</version>
<version>1.0.2_7</version>

<name>guardian</name>
<!-- FIXME change it to the project's website -->
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/jonteohr/discord/guardian/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bb3fa06

Please sign in to comment.