Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
fix: now showing icon for source in /nowplaying
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusbegby committed Jul 16, 2023
1 parent 52ef374 commit a554551
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion commands/nowplaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -157,7 +165,9 @@ module.exports = {
},
{
name: '**Audio source**',
value: `**[${source}](${currentTrack.url})**`,
value: `**${sourceIcons.get(
currentTrack.raw.source
)} [${source}](${currentTrack.url})**`,
inline: true
}
)
Expand Down

0 comments on commit a554551

Please sign in to comment.