diff --git a/command/src/main/java/com/jagrosh/jdautilities/command/CommandClientBuilder.java b/command/src/main/java/com/jagrosh/jdautilities/command/CommandClientBuilder.java index 98c54916..88505c3d 100644 --- a/command/src/main/java/com/jagrosh/jdautilities/command/CommandClientBuilder.java +++ b/command/src/main/java/com/jagrosh/jdautilities/command/CommandClientBuilder.java @@ -223,7 +223,7 @@ public CommandClientBuilder setEmojis(String success, String warning, String err /** * Sets the {@link net.dv8tion.jda.api.entities.Activity Game} to use when the bot is ready. - *
Can be set to {@code null} for no activity. + *
Can be set to {@code null} for JDA Utilities to not set it. * * @param activity * The Game to use when the bot is ready diff --git a/command/src/main/java/com/jagrosh/jdautilities/command/impl/CommandClientImpl.java b/command/src/main/java/com/jagrosh/jdautilities/command/impl/CommandClientImpl.java index 77abf63b..c819fac3 100644 --- a/command/src/main/java/com/jagrosh/jdautilities/command/impl/CommandClientImpl.java +++ b/command/src/main/java/com/jagrosh/jdautilities/command/impl/CommandClientImpl.java @@ -473,8 +473,10 @@ private void onReady(ReadyEvent event) return; } textPrefix = prefix.equals(DEFAULT_PREFIX) ? "@"+event.getJDA().getSelfUser().getName()+" " : prefix; - event.getJDA().getPresence().setPresence(status==null ? OnlineStatus.ONLINE : status, - activity ==null ? null : "default".equals(activity.getName()) ? Activity.playing("Type "+textPrefix+helpWord) : activity); + + if(activity != null) + event.getJDA().getPresence().setPresence(status==null ? OnlineStatus.ONLINE : status, + "default".equals(activity.getName()) ? Activity.playing("Type "+textPrefix+helpWord) : activity); // Start SettingsManager if necessary GuildSettingsManager manager = getSettingsManager();