add correct null handling for api objects

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

No files matched your search

@@ -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!");
}