Skip to content

Commit

Permalink
feat: make the spotify status song name clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
virtual-designer committed Oct 9, 2022
1 parent 8f399bf commit 6d69d82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/information/ProfileCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ export default class ProfileCommand extends BaseCommand {
}
else if (a.type === 'LISTENING') {
if (a.name === 'Spotify') {
activities.push(`:notes: Listening to **Spotify**: **${a.state?.replace(/\;/, ',')} - ${a.details}**`);
const url = a.syncId ? `https://open.spotify.com/track/${a.syncId}` : null;
activities.push(`:notes: Listening to **Spotify**: ${url ? '[' : '**'}${a.state?.replace(/\;/, ',')} - ${a.details}${url ? '](' + url + ')' : '**'}`);
continue;
}

Expand Down

0 comments on commit 6d69d82

Please sign in to comment.