From 8cb5dc3c275284a02b916242043a63994540f436 Mon Sep 17 00:00:00 2001 From: Zerio <43386412+ZerioDev@users.noreply.github.com> Date: Wed, 24 Jun 2020 14:58:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Modifications=20handler=20/=20co?= =?UTF-8?q?de?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/resume.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/commands/resume.js b/commands/resume.js index 3b9a769..02c69bc 100644 --- a/commands/resume.js +++ b/commands/resume.js @@ -1,18 +1,18 @@ const emotes = require ("../config/emojis.json"); +const Discord = require("discord.js") -module.exports.run = async (client, message) => { +exports.run = async (client, message, args) => { - if(!message.member.voice.channel) return message.channel.send(`**You're not in a voice channel ${emotes.error}**`); + //If the member is not in a voice channel + if(!message.member.voice.channel) return message.channel.send(`You're not in a voice channel ${emotes.error}`); - const track = await client.player.resume(message.guild.id); + //Get song + const song = await client.player.resume(message.guild.id); - if(!track) return message.channel.send(`**No tracks currently playing ${emotes.error}**`); + //If there's no music + if(!song) return message.channel.send(`No songs currently playing ${emotes.error}`); - message.channel.send(`**Track ${track.name} resumed ${emotes.success}**`); + //Message + message.channel.send(`Song ${song.name} resumed ${emotes.success}`); -}; - -module.exports.config = { - name: "resume", - aliases: [] -}; \ No newline at end of file +}