diff --git a/pom.xml b/pom.xml
index 996abd4..d4f019a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,8 +11,8 @@
UTF-8
UTF-8
- 8
- 8
+ 17
+ 17
@@ -45,15 +45,6 @@
-
-
- maven-compiler-plugin
- 2.3.2
-
-
- 1.8
-
-
@@ -69,7 +60,7 @@
net.dv8tion
JDA
- 5.0.0-alpha.17
+ 5.0.0-alpha.18
org.yaml
@@ -116,6 +107,21 @@
json
20220320
+
+ org.mariadb.jdbc
+ mariadb-java-client
+ 3.0.7
+
+
+ org.xerial
+ sqlite-jdbc
+ 3.39.2.0
+
+
+ com.zaxxer
+ HikariCP
+ 5.0.1
+
\ No newline at end of file
diff --git a/src/main/java/net/tylermurphy/ken/Config.java b/src/main/java/net/tylermurphy/ken/Config.java
index c5a5991..96d5bf5 100644
--- a/src/main/java/net/tylermurphy/ken/Config.java
+++ b/src/main/java/net/tylermurphy/ken/Config.java
@@ -93,6 +93,8 @@ public class Config {
throw new RuntimeException("Unable to finalize loading of config files.");
}
+ this.saveConfig();
+
}
@SuppressWarnings({"rawtypes", "unchecked"})
diff --git a/src/main/java/net/tylermurphy/ken/Ken.java b/src/main/java/net/tylermurphy/ken/Ken.java
index dbdca83..97df266 100644
--- a/src/main/java/net/tylermurphy/ken/Ken.java
+++ b/src/main/java/net/tylermurphy/ken/Ken.java
@@ -13,6 +13,7 @@ import net.dv8tion.jda.api.hooks.ListenerAdapter;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.MemberCachePolicy;
import net.tylermurphy.ken.command.Responder;
+import net.tylermurphy.ken.database.Database;
import net.tylermurphy.ken.music.PlayerManager;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
@@ -32,11 +33,13 @@ public class Ken {
private final PlayerManager playerManager;
private final YouTube youTube;
private final Responder responder;
+ private final Database database;
private Ken(){
Ken.instance = this;
this.config = Config.create("config.yml");
this.log = LoggerFactory.getLogger(Ken.class);
+ this.database = new Database();
try {
api = JDABuilder.createDefault(config.getString("botToken"))
.setActivity(Activity.playing("@Ken | /help"))
@@ -93,6 +96,8 @@ public class Ken {
public YouTube getYouTube() { return youTube; }
+ public Database getDatabase() { return database; }
+
public EmbedBuilder getDefaultEmbed() {
EmbedBuilder builder = new EmbedBuilder();
builder.setColor(new Color(
diff --git a/src/main/java/net/tylermurphy/ken/command/Responder.java b/src/main/java/net/tylermurphy/ken/command/Responder.java
index e7843ee..21ed9ad 100644
--- a/src/main/java/net/tylermurphy/ken/command/Responder.java
+++ b/src/main/java/net/tylermurphy/ken/command/Responder.java
@@ -13,7 +13,9 @@ import net.dv8tion.jda.api.interactions.commands.build.Commands;
import net.dv8tion.jda.api.interactions.commands.build.OptionData;
import net.dv8tion.jda.api.interactions.commands.build.SlashCommandData;
import net.dv8tion.jda.api.interactions.components.buttons.Button;
-import net.dv8tion.jda.api.requests.restaction.WebhookMessageAction;
+import net.dv8tion.jda.api.requests.restaction.WebhookMessageCreateAction;
+import net.dv8tion.jda.api.requests.restaction.interactions.ReplyCallbackAction;
+import net.dv8tion.jda.api.utils.FileUpload;
import net.tylermurphy.ken.Ken;
import net.tylermurphy.ken.util.*;
import org.reflections.Reflections;
@@ -115,9 +117,6 @@ public class Responder extends ListenerAdapter {
return;
}
- // Defer Reply
- event.deferReply().queue();
-
// Get slash command options if there are any
List