1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 03:33:17 +00:00

Update play.js

This commit is contained in:
Matte 2019-10-20 20:59:53 +03:00 committed by GitHub
parent 102b10df79
commit 6d98488f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,12 +25,11 @@ module.exports = async function (guild, song, client, message, seek) {
}); });
dispatcher.setVolume(serverQueue.volume / 10); dispatcher.setVolume(serverQueue.volume / 10);
dispatcher.on("error", error => console.error(error)); dispatcher.on("error", error => console.error(error));
/*let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url)); let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url));
let songtime = (data.length_seconds * 1000).toFixed(0); let songtime = (data.length_seconds * 1000).toFixed(0);
const embed = new Discord.RichEmbed() const embed = new Discord.RichEmbed()
.setTitle(`:musical_note: Start playing: **${song.title}**`) .setTitle(`:musical_note: Start playing: **${song.title}**`)
.setDescription(`Song duration: \`${client.funcs.msToTime(songtime)}\``) .setDescription(`Song duration: \`${client.funcs.msToTime(songtime)}\``)
.setColor("#b50002") .setColor("#b50002")
serverQueue.textChannel.send(embed);*/ serverQueue.textChannel.send(embed);
serverQueue.textChannel.send('Playing');
} }