This commit is contained in:
MatteZ02 2020-03-08 17:03:39 +02:00
parent f8691b1892
commit f4cc507621
3 changed files with 6 additions and 4 deletions

View File

@ -10,11 +10,10 @@ module.exports = {
if (!radio) return msg.channel.send('<:redx:674263474704220182> There is nothing playing.');
if (!radio.playing) return msg.channel.send('<:redx:674263474704220182> There is nothing playing.');
radio.time = radio.connection.dispatcher.streamTime;
let completed = (radio.time.toFixed(0));
const completed = (radio.time.toFixed(0));
const embed = new Discord.MessageEmbed()
.setTitle("__Now playing__")
.setDescription(`<a:aNotes:674602408105476106>**Now playing:** ${radio.url}\n\`${client.funcs.msToTime(completed, "hh:mm:ss")}\``)
/*.setThumbnail(thumbnail._rejectionHandler0)*/
.setColor(client.config.embedColor)
return msg.channel.send(embed);
}

View File

@ -24,7 +24,8 @@ module.exports = {
}
if (radio) {
radio.connection.dispatcher.end();
radio.connection.dispatcher.destroy();
client.funcs.play(msg.guild, client, url);
}
const construct = {

View File

@ -7,7 +7,9 @@ module.exports = {
category: 'music',
execute(msg, args, client, Discord, prefix, command) {
const radio = client.radio.get(msg.guild.id);
radio.connection.dispatcher.end();
radio.connection.dispatcher.destroy();
radio.voiceChannel.leave();
client.radio.delete(guild.id);
msg.channel.send('<:stop:674685626108477519> Stopped the music!');
}
};