package com.avairebot.orion.commands.music;

import com.avairebot.orion.Orion;
import com.avairebot.orion.audio.AudioHandler;
import com.avairebot.orion.contracts.commands.AbstractCommand;
import net.dv8tion.jda.core.entities.Message;

import java.util.Arrays;
import java.util.List;

public class SkipCommand extends AbstractCommand {

    public SkipCommand(Orion orion) {
        super(orion, false);
    }

    @Override
    public String getName() {
        return "Skip Music Command";
    }

    @Override
    public String getDescription() {
        return "Skips to the next song in the music queue.";
    }

    @Override
    public List<String> getUsageInstructions() {
        return Arrays.asList("`!skip` - Skips to the next song in the queue");
    }

    @Override
    public String getExampleUsage() {
        return null;
    }

    @Override
    public List<String> getTriggers() {
        return Arrays.asList("skip");
    }

    @Override
    public boolean onCommand(Message message, String[] args) {
        AudioHandler.skipTrack(message);
        return true;
    }
}

@@ -119,16 +119,68 @@
 andler;%0A
+import com.avairebot.orion.audio.GuildMusicManager;%0A
 import c
@@ -883,12 +883,17 @@
 urn 
-null
+%22%60!skip%60%22
 ;%0A  
@@ -1002,32 +1002,32 @@
 %0A%0A    @Override%0A
-
     public boole
@@ -1069,24 +1069,296 @@
 g%5B%5D args) %7B%0A
+        GuildMusicManager musicManager = AudioHandler.getGuildAudioPlayer(message.getGuild());%0A%0A        if (musicManager.getPlayer().getPlayingTrack() == null) %7B%0A            return sendErrorMessage(message, %22Nothing to skip, request music first with %60!play%60%22);%0A        %7D%0A%0A
         Audi

Check if music is playing before skipping in music skip command