Prevent error if queue command is used while not in a channel.
This commit is contained in:
parent
758f6a0d48
commit
143f5dacda
|
@ -36,7 +36,9 @@ public class QueueCommand extends Command
|
||||||
String message = ">>> ";
|
String message = ">>> ";
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
|
||||||
final Track currentTrack = bot.getMusicHandler().getCurrentTrack();
|
Track currentTrack = null;
|
||||||
|
if (bot.getMusicHandler() != null)
|
||||||
|
currentTrack = bot.getMusicHandler().getCurrentTrack();
|
||||||
if (currentTrack != null)
|
if (currentTrack != null)
|
||||||
message += ":notes: **Now playing: " + currentTrack + "**\n";
|
message += ":notes: **Now playing: " + currentTrack + "**\n";
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue