Skip to content

Commit

Permalink
[Fix] Fix error in console when stopping bot module when it is not in…
Browse files Browse the repository at this point in the history
…itialize
  • Loading branch information
Lea-Bar committed Feb 12, 2025
1 parent 08fc72d commit 8328eb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public class ConfigModule implements IModule {
@Override
public CompletableFuture<Boolean> start() {
return CompletableFuture.supplyAsync(() -> {
ConfigManager.getInstance().loadAllConfig();
return true;
boolean loaded = ConfigManager.getInstance().loadAllConfig();
return loaded;
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public CompletableFuture<Boolean> start() {

@Override
public void stop() {
if(this.jdaInstance.getStatus().isInit()){
if(this.jdaInstance != null && this.jdaInstance.getStatus().isInit()){
try {
this.jdaInstance.awaitShutdown();
} catch (InterruptedException e) {
Expand Down

0 comments on commit 8328eb8

Please sign in to comment.