From e3019705453d6afb1199c10f803e05f189512934 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Tue, 22 Jun 2021 22:24:42 +0530 Subject: Renames Command ```tune``` to ```fm``` Adds Presense of BOT with current radio station --- src/commands/tune.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/commands') diff --git a/src/commands/tune.js b/src/commands/tune.js index e00b50d..3c78474 100644 --- a/src/commands/tune.js +++ b/src/commands/tune.js @@ -6,14 +6,14 @@ let radioIndex = 0; async function broadcastRadio(client, args, message, voiceChannel, textChannel) { const connection = await voiceChannel.join(); try { - playRadio(connection, textChannel, args); + playRadio(connection, textChannel, args, client); } catch (error) { console.log(error); textChannel.send('Something went wrong. RADIO MON got ill...😱😱'); } } -async function playRadio(connection, textChannel, args) { +async function playRadio(connection, textChannel, args, client) { try { const [radioCommand] = args; const radioConfig = await readFile('src/configs/radio.json', 'utf8'); @@ -43,6 +43,7 @@ async function playRadio(connection, textChannel, args) { .setDescription(currentRadioStation.name) .setColor('LUMINOUS_VIVID_PINK'); textChannel.send(nowPlayingMessage) + client.user.setPresence({ activity: { name: `${currentRadioStation.name}`, type: 'LISTENING' } }); } catch (error) { console.log(error); }; -- cgit v1.2.3