{"size": 848, "ext": "js", "max_stars_repo_path": "src/Commands/Music/Pause.js", "max_stars_repo_name": "megaettore/Express", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Commands/Music/Pause.js", "max_issues_repo_name": "megaettore/Express", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Commands/Music/Pause.js", "max_forks_repo_name": "megaettore/Express", "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": 40.380952381, "max_line_length": 150, "alphanum_fraction": 0.6108490566}
const Command = require('../../Structures/Command');

module.exports = class extends Command {
    constructor(...args) {
        super(...args, {
            aliases: ["resume"],
            description: "Pauses/resumes the player",
            category: "Music"
        });
    }

    async run(message) {
        const { channel } = message.member.voice;
        const player = this.client.music.players.get(message.guild.id);
        if(!player || !player.queue[0]) return message.channel.send("Non ci sono canzoni in ascolto, che ti fumi?");
        if(channel.id !== player.voiceChannel.id) return message.channel.send("Devi stare nel canale vocale dove mi trovo per farlo.L'abc proprio..");
        
        player.pause(player.playing);
        return message.channel.send(`Player is now ${player.playing ? "resumed" : "paused"}.`);
    }
}