add correct null handling for api objects

This commit is contained in:
2025-02-19 13:56:45 +01:00
parent 5d8f737481
commit 92704ca230
2 changed files with 6 additions and 1 deletions

View File

@@ -57,6 +57,8 @@ public class Discord4JWrapper extends LibraryWrapper {
if (api != null)
api.on(InteractionCreateEvent.class)
.subscribe(event -> handleInteraction(event));
else
logger.warn("GatewayDiscordClient was null so no Events were subscribed to.");
logger.info("Discord4J wrapper loaded!");
}