Skip to content

Commit

Permalink
fixed NONE for game
Browse files Browse the repository at this point in the history
  • Loading branch information
jagrosh committed Aug 18, 2017
1 parent dddf4c8 commit 6b454c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/jagrosh/jmusicbot/JMusicBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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)
Expand Down

0 comments on commit 6b454c2

Please sign in to comment.