{"size": 767, "ext": "js", "max_stars_repo_path": "music/skip.js", "max_stars_repo_name": "TyrelN/Florence", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "music/skip.js", "max_issues_repo_name": "TyrelN/Florence", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "music/skip.js", "max_forks_repo_name": "TyrelN/Florence", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 51.1333333333, "max_line_length": 123, "alphanum_fraction": 0.6479791395}
//with reference to https://gabrieltanner.org/blog/dicord-music-bot
module.exports = {
    name: 'skip',
    description: 'skips the current song playing and goes straight to the next',
    async execute(message, commandArgs, queue, serverQueue) {
        if(!message.member.voice.channel)
            return message.channel.send(
                "You have to be in a voice channel to mess with the music").then((reply) => reply.delete({timeout: 5000}));
        if(!serverQueue){
            return message.channel.send("There is no song to skip").then((reply) => reply.delete({timeout: 5000}));
        }
        serverQueue.connection.dispatcher.end();
        message.channel.send('skipping current song!').then((reply) => reply.delete({timeout: 5000}));
    }
};