From a554551022980bcf58f422d937e693c574edfc83 Mon Sep 17 00:00:00 2001 From: Marius Begby Date: Sun, 16 Jul 2023 19:42:58 +0200 Subject: [PATCH] fix: now showing icon for source in /nowplaying --- commands/nowplaying.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/commands/nowplaying.js b/commands/nowplaying.js index 51f93c32..e71cf7db 100644 --- a/commands/nowplaying.js +++ b/commands/nowplaying.js @@ -59,6 +59,14 @@ module.exports = { ['arbitrary', 'Direct source'] ]); + const sourceIcons = new Map([ + ['youtube', embedIcons.sourceYouTube], + ['soundcloud', embedIcons.sourceSoundCloud], + ['spotify', embedIcons.sourceSpotify], + ['apple_music', embedIcons.sourceAppleMusic], + ['arbitrary', embedIcons.sourceArbitrary] + ]); + const currentTrack = queue.currentTrack; let author = currentTrack.author ? currentTrack.author : 'Unavailable'; @@ -157,7 +165,9 @@ module.exports = { }, { name: '**Audio source**', - value: `**[${source}](${currentTrack.url})**`, + value: `**${sourceIcons.get( + currentTrack.raw.source + )} [${source}](${currentTrack.url})**`, inline: true } )