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

master
Nekojimi 1 month 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