From a59d2baa959f1113b2e0efe4bbca13fbe427da1f Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Jul 2020 18:56:43 -0400 Subject: added args --- bot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.js b/bot.js index d17421e..9c11699 100644 --- a/bot.js +++ b/bot.js @@ -19,7 +19,6 @@ function playAudio() { console.log("Successfully connected to this channel."); connection.play('./music/4616-werq-by-kevin-macleod.mp3'); }).catch(e => { - // Oh no, it errored! Let's log it to console :) console.error(e); }); } @@ -33,6 +32,7 @@ client.on('ready', () => { client.on('message', async msg => { if (!['242775871059001344'].includes(msg.author.id)) return; + const args = msg.content.slice(prefix.length).trim().split(/ +/g); if (!msg.guild) return; if (msg.author.bot) return; if (!msg.content.startsWith(prefix)) return; -- cgit v1.2.3