diff --git a/src/index.js b/src/index.js index cef118c..40f3b0e 100644 --- a/src/index.js +++ b/src/index.js @@ -184,7 +184,7 @@ async function queueUp(url, id) { } if (err) { - return [null, `failed to retrieve youtube-dl info!: \`\`\`${err}\`\`\``]; + return [null, `failed to retrieve youtube-dl info!: \`\`\`${err.toString().slice(0, 1000)}\`\`\``]; } else { if (info.length) { info.forEach(i => { @@ -206,7 +206,7 @@ bot.on('messageCreate', async (msg) => { const params = content.replace(prefix, '').split(' '); const cmd = params[0]; - if (!msg.guild || !content.startsWith(prefix)) return; + if (!msg.guild || !content.startsWith(prefix) || !msg.channel) return; if ((cmd === 'play' || cmd === 'p') && params[1]) { const connection = await checkVoiceChannel(msg);