Prevent error if queue command is used while not in a channel.

master
Nekojimi 9 months ago
parent 758f6a0d48
commit 143f5dacda
  1. 4
      src/main/java/moe/nekojimi/chords/commands/QueueCommand.java

@ -36,7 +36,9 @@ public class QueueCommand extends Command
String message = ">>> ";
int i = 1;
final Track currentTrack = bot.getMusicHandler().getCurrentTrack();
Track currentTrack = null;
if (bot.getMusicHandler() != null)
currentTrack = bot.getMusicHandler().getCurrentTrack();
if (currentTrack != null)
message += ":notes: **Now playing: " + currentTrack + "**\n";
else

Loading…
Cancel
Save