refactor: make global plugins in Bot use the one from the Main class

and also initialize LoggerPlugin in Bot because i was dumb lol, now it's the first plugin to load in each bot
This commit is contained in:
ChomeNS
2025-04-01 19:34:44 +07:00
parent 7617818720
commit 58e722ba06
8 changed files with 12 additions and 29 deletions

View File

@@ -1,9 +1,7 @@
package me.chayapak1.chomens_bot.plugins;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import me.chayapak1.chomens_bot.Bot;
import me.chayapak1.chomens_bot.Configuration;
import me.chayapak1.chomens_bot.Main;
import me.chayapak1.chomens_bot.command.CommandException;
import me.chayapak1.chomens_bot.util.LoggerUtilities;
import net.kyori.adventure.text.Component;
@@ -30,10 +28,7 @@ public class DatabasePlugin {
);
} catch (SQLException e) {
LoggerUtilities.error(e);
return;
}
for (Bot bot : Main.bots) bot.database = this;
}
public void checkOverloaded () throws CommandException {