From 6b454c299de7d8d3fd3fe6af1574ef998680818e Mon Sep 17 00:00:00 2001 From: John Grosh Date: Fri, 18 Aug 2017 16:42:32 -0400 Subject: [PATCH] fixed NONE for game --- src/main/java/com/jagrosh/jmusicbot/JMusicBot.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jagrosh/jmusicbot/JMusicBot.java b/src/main/java/com/jagrosh/jmusicbot/JMusicBot.java index 82c702449..f53ab3d8b 100644 --- a/src/main/java/com/jagrosh/jmusicbot/JMusicBot.java +++ b/src/main/java/com/jagrosh/jmusicbot/JMusicBot.java @@ -107,10 +107,14 @@ public static void main(String[] args){ new SetstatusCmd(bot), new ShutdownCmd(bot) ); + boolean nogame = false; if(config.getGame()==null) cb.useDefaultGame(); else if(config.getGame().equalsIgnoreCase("none")) + { cb.setGame(null); + nogame = true; + } else cb.setGame(Game.of(config.getGame())); CommandClient client = cb.build(); @@ -133,7 +137,7 @@ else if(config.getGame().equalsIgnoreCase("none")) new JDABuilder(AccountType.BOT) .setToken(config.getToken()) .setAudioEnabled(true) - .setGame(Game.of("loading...")) + .setGame(nogame ? null : Game.of("loading...")) .setStatus(OnlineStatus.DO_NOT_DISTURB) .addEventListener(client) .addEventListener(waiter)