remove debugs

This commit is contained in:
Lukáš H 2020-06-06 10:38:00 +02:00
parent de956b5197
commit 6412ea346d
No known key found for this signature in database
GPG key ID: 52AED802C323B705

View file

@ -189,40 +189,23 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
guild.channel = message.channel guild.channel = message.channel
} }
console.log('[MUSIC DEBUG] joining vc');
const connection = await vc.join() const connection = await vc.join()
console.log('[MUSIC DEBUG] joined vc');
const v = guild.queue[0] const v = guild.queue[0]
console.log('[MUSIC DEBUG] got v');
try { try {
console.log('[MUSIC DEBUG] getting link');
let link = exports.getLinkFromID(v.video.videoId); let link = exports.getLinkFromID(v.video.videoId);
console.log('[MUSIC DEBUG] got link: ' + (message.guild.id == '410990517841690625' ? link : 'not woomy server'));
let y = null; let y = null;
/*setTimeout(() => {
setTimeout(() => {
if(y == null) { if(y == null) {
console.log('[MUSIC DEBUG] y is still null'); console.log('[MUSIC DEBUG] y is still null');
}; };
}, 5000); }, 5000);*/
console.log('[MUSIC DEBUG] await ytdl');
y = await ytdl(link, { highWaterMark: 1024 * 1024 * 32 }); y = await ytdl(link, { highWaterMark: 1024 * 1024 * 32 });
console.log('[MUSIC DEBUG] got ytdl');
console.log('[MUSIC DEBUG] connection.play');
guild.dispatcher = connection.play(y, { type: 'opus' }); guild.dispatcher = connection.play(y, { type: 'opus' });
console.log('[MUSIC DEBUG] got dispatcher');
} catch (err) { } catch (err) {
console.error(err);
if (playNext && playNext === true) { if (playNext && playNext === true) {
guild.queue.splice(1, 1) guild.queue.splice(1, 1)
} else { } else {
@ -233,9 +216,7 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
return message.channel.send(`<:error:466995152976871434> An error has occured: \n\`${err}\``) return message.channel.send(`<:error:466995152976871434> An error has occured: \n\`${err}\``)
// return message.channel.send('<:error:466995152976871434> YouTube have made changes to their site that break Woomy\'s music module. An announcement will be made in the development server when this issue is resolved.') // return message.channel.send('<:error:466995152976871434> YouTube have made changes to their site that break Woomy\'s music module. An announcement will be made in the development server when this issue is resolved.')
} }
console.log('[MUSIC DEBUG] setting volume');
guild.dispatcher.setVolume(0.25) guild.dispatcher.setVolume(0.25)
console.log('[MUSIC DEBUG] set volume');
guild.channel.send('<:player:467216674622537748> Now playing: **' + v.video.title + '** `[' + exports.createTimestamp(v.video.lengthSeconds) + ']`') guild.channel.send('<:player:467216674622537748> Now playing: **' + v.video.title + '** `[' + exports.createTimestamp(v.video.lengthSeconds) + ']`')
@ -245,8 +226,6 @@ exports.play = async function (client, message, query, playNext, ignoreQueue) {
}); });
guild.dispatcher.once('finish', () => { guild.dispatcher.once('finish', () => {
console.log('[MUSIC DEBUG] dispatcher finish');
guild.queue.shift() guild.queue.shift()
guild.playing = false guild.playing = false