1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 05:10:17 +00:00

editing console logs

This commit is contained in:
MatteZ02 2019-10-12 13:34:38 +03:00
parent 81f317105b
commit 59b578c5a5
2 changed files with 7 additions and 6 deletions

View File

@ -18,6 +18,7 @@ module.exports = {
console.log("no serverQueue") console.log("no serverQueue")
if (!voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in a voice channel to play music!'); if (!voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in a voice channel to play music!');
} else { } else {
console.log("serverQueue")
if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to play music!'); if (voiceChannel !== serverQueue.voiceChannel) return message.channel.send(':x: I\'m sorry but you need to be in the same voiceChannel as Musix to play music!');
} }
if (!args[1]) return message.channel.send(':x: You need to use a link or search for a song!'); if (!args[1]) return message.channel.send(':x: You need to use a link or search for a song!');

View File

@ -29,18 +29,18 @@ module.exports = async function (guild, song, client, message, seek) {
console.log("playing next song") console.log("playing next song")
client.funcs.play(guild, serverQueue.songs[0], client, message); client.funcs.play(guild, serverQueue.songs[0], client, message);
}); });
console.log("settings volume") console.log("setting volume")
dispatcher.setVolume(serverQueue.volume / 10); dispatcher.setVolume(serverQueue.volume / 10);
console.log("checking for errors") console.log("checking for errors")
dispatcher.on("error", error => console.error(error)); dispatcher.on("error", error => console.error(error));
console.log("defining data") console.log("defining data |")
let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url)); //let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url));
console.log("defining songtime") console.log("defining songtime |")
let songtime = (data.length_seconds * 1000).toFixed(0); //let songtime = (data.length_seconds * 1000).toFixed(0);
console.log("creating embed") console.log("creating embed")
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")
console.log("sending embed") console.log("sending embed")
return serverQueue.textChannel.send(embed); return serverQueue.textChannel.send(embed);