From 59b578c5a529aea5473cd9c05d6f1899e6f65eae Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Sat, 12 Oct 2019 13:34:38 +0300 Subject: [PATCH] editing console logs --- commands/play.js | 1 + funcs/play.js | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/commands/play.js b/commands/play.js index a38f997a..64381fdc 100644 --- a/commands/play.js +++ b/commands/play.js @@ -18,6 +18,7 @@ module.exports = { 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!'); } 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 (!args[1]) return message.channel.send(':x: You need to use a link or search for a song!'); diff --git a/funcs/play.js b/funcs/play.js index ce335e22..4e709364 100644 --- a/funcs/play.js +++ b/funcs/play.js @@ -29,18 +29,18 @@ module.exports = async function (guild, song, client, message, seek) { console.log("playing next song") client.funcs.play(guild, serverQueue.songs[0], client, message); }); - console.log("settings volume") + console.log("setting volume") dispatcher.setVolume(serverQueue.volume / 10); console.log("checking for errors") dispatcher.on("error", error => console.error(error)); - console.log("defining data") - let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url)); - console.log("defining songtime") - let songtime = (data.length_seconds * 1000).toFixed(0); + console.log("defining data |") + //let data = await Promise.resolve(ytdl.getInfo(serverQueue.songs[0].url)); + console.log("defining songtime |") + //let songtime = (data.length_seconds * 1000).toFixed(0); console.log("creating embed") const embed = new Discord.RichEmbed() .setTitle(`:musical_note: Start playing: **${song.title}**`) - .setDescription(`Song duration: \`${client.funcs.msToTime(songtime)}\``) + //.setDescription(`Song duration: \`${client.funcs.msToTime(songtime)}\``) .setColor("#b50002") console.log("sending embed") return serverQueue.textChannel.send(embed);