From ab353d24f6bb45979e5ae68c54099049b055a15f Mon Sep 17 00:00:00 2001 From: "Ansgar [Hiajen]" Date: Fri, 10 Dec 2021 21:42:04 +0100 Subject: [PATCH] Update stuff, fix stuff, not my proudest commit --- build.gradle | 18 +++++++++++------- src/main/java/Controll/Admin.java | 2 +- src/main/java/Controll/Controller.java | 3 +++ src/main/java/Controll/GuildController.java | 1 - src/main/java/Controll/Help.java | 2 +- src/main/java/Modules/Fold.java | 2 +- src/main/java/Modules/Purge.java | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index dac17f7..724aed4 100644 --- a/build.gradle +++ b/build.gradle @@ -5,21 +5,25 @@ plugins { group 'BOT' -version '1.0.0' +version '1.0.1' -def jdaVersion = '4.2.0_225' +def jdaVersion = '4.4.0_350' def jsonsimpleVersion = '1.1.1' -def jodatimeVersion = '2.10.6' -def self4JVersion = '1.7.30' -def log4jVersion = '2.13.3' -def JSON = '4.12.0' +def jodatimeVersion = '2.10.13' +def self4JVersion = '1.7.32' +def log4jVersion = '2.15.0' +def JSON = '4.13.0' mainClassName = 'MissingIDent' sourceCompatibility = 1.8 compileJava.options.encoding = 'UTF-8' repositories { - jcenter() + mavenCentral() + maven { + name 'm2-dv8tion' + url 'https://m2.dv8tion.net/releases' + } } dependencies { diff --git a/src/main/java/Controll/Admin.java b/src/main/java/Controll/Admin.java index 4a63189..2ca4237 100644 --- a/src/main/java/Controll/Admin.java +++ b/src/main/java/Controll/Admin.java @@ -18,7 +18,7 @@ public class Admin extends SuperModule { public static final String command = "admin"; public Admin(GuildController guildController) { - super(command, guildController, null); + super(command, guildController); } @Override diff --git a/src/main/java/Controll/Controller.java b/src/main/java/Controll/Controller.java index 3202212..607cf46 100644 --- a/src/main/java/Controll/Controller.java +++ b/src/main/java/Controll/Controller.java @@ -99,6 +99,9 @@ public class Controller extends ListenerAdapter { @Override public void onGenericEvent(@NotNull GenericEvent event){ + if (guilds == null) + return; + if (event instanceof GuildJoinEvent) onGuildJoin((GuildJoinEvent) event); else if (event instanceof GuildLeaveEvent) diff --git a/src/main/java/Controll/GuildController.java b/src/main/java/Controll/GuildController.java index 5a47e29..45e05f3 100644 --- a/src/main/java/Controll/GuildController.java +++ b/src/main/java/Controll/GuildController.java @@ -103,7 +103,6 @@ public class GuildController { if (checkForActivate(Purge.COMMAND)) modules.add(new Purge(this)); - if (checkForActivate(Quote.command)) modules.add(new Quote(this)); diff --git a/src/main/java/Controll/Help.java b/src/main/java/Controll/Help.java index f24f088..c9c447c 100644 --- a/src/main/java/Controll/Help.java +++ b/src/main/java/Controll/Help.java @@ -14,7 +14,7 @@ public class Help extends SuperModule { public static final String command = "help"; public Help( GuildController guildController){ - super(command, guildController, null); + super(command, guildController); } @Override diff --git a/src/main/java/Modules/Fold.java b/src/main/java/Modules/Fold.java index 5b18039..dce4a20 100644 --- a/src/main/java/Modules/Fold.java +++ b/src/main/java/Modules/Fold.java @@ -36,7 +36,7 @@ public class Fold extends SuperModule{ userFile = "/home/bots/MissingIdentifier/MissingIdent/user_summary.txt"; public Fold(GuildController guildController){ - super(COMMAND, guildController, null); + super(COMMAND, guildController); } @Override diff --git a/src/main/java/Modules/Purge.java b/src/main/java/Modules/Purge.java index 8a63b0e..9dc5bfa 100644 --- a/src/main/java/Modules/Purge.java +++ b/src/main/java/Modules/Purge.java @@ -19,7 +19,7 @@ public class Purge extends SuperModule{ public static final String COMMAND = "purge"; public Purge(GuildController guildController){ - super(COMMAND, guildController, null); + super(COMMAND, guildController); } @Override