Skip to content

Commit

Permalink
Fix slf4j errors on Discord-Bot startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Almighty-Satan committed Jan 14, 2024
1 parent e606cee commit 7553ec0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ dependencies {
runtimeDownload("net.dv8tion:JDA:5.0.0-beta.19") {
exclude(module = "opus-java")
}
runtimeDownload("org.slf4j:slf4j-simple:1.7.36") {
exclude(module = "slf4j-api")
}
runtimeDownload("com.github.pengrad:java-telegram-bot-api:6.9.0")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")
Expand Down
2 changes: 1 addition & 1 deletion src/de/cuuky/varo/bot/discord/VaroDiscordBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private Color getRandomColor() {

@Override
public void connect() {
System.out.println(Main.getConsolePrefix() + "Activating discord bot... (Errors might appear - don't mind them)");
System.out.println(Main.getConsolePrefix() + "Activating discord bot...");
JDABuilder builder = JDABuilder.createLight(ConfigSetting.DISCORDBOT_TOKEN.getValueAsString());
builder.setActivity(Activity.customStatus(ConfigSetting.DISCORDBOT_GAMESTATE.getValueAsString()));
builder.setAutoReconnect(true);
Expand Down
1 change: 1 addition & 0 deletions src/de/cuuky/varo/data/Dependencies.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class Dependencies {
static {
OPTIONAL_DEPENDENCIES.add(new VaroDependency("gson", MAVEN_CENTERAL, JarDependency::new, () -> !doesClassExist("com.google.gson.JsonElement")));
OPTIONAL_DEPENDENCIES.add(new VaroDependency("JDA", MAVEN_CENTERAL, JarDependency::new, () -> ConfigSetting.DISCORDBOT_ENABLED.getValueAsBoolean() && !doesClassExist("net.dv8tion.jda.api.JDA")));
OPTIONAL_DEPENDENCIES.add(new VaroDependency("slf4j-simple", MAVEN_CENTERAL, JarDependency::new, () -> ConfigSetting.DISCORDBOT_ENABLED.getValueAsBoolean() && !doesClassExist("org.slf4j.impl.SimpleLogger")));
OPTIONAL_DEPENDENCIES.add(new VaroDependency("java-telegram-bot-api", MAVEN_CENTERAL, JarDependency::new, () -> ConfigSetting.TELEGRAM_ENABLED.getValueAsBoolean() && !doesClassExist("com.pengrad.telegrambot.TelegramBot")));
}

Expand Down

0 comments on commit 7553ec0

Please sign in to comment.