utility.presence: link spotify tracks
This commit is contained in:
parent
964dc27308
commit
179d4599e5
1 changed files with 7 additions and 1 deletions
|
@ -1073,7 +1073,13 @@ presence.callback = async function (msg, line) {
|
|||
};
|
||||
const descLines = [];
|
||||
if (activity.type == 2) {
|
||||
if (activity.details) descLines.push(`**${activity.details}**`);
|
||||
if (activity.details) {
|
||||
let details = activity.details;
|
||||
if (activity.name == "Spotify" && activity.sync_id) {
|
||||
details = `[${details}](https://open.spotify.com/track/${activity.sync_id})`;
|
||||
}
|
||||
descLines.push(`**${details}**`);
|
||||
}
|
||||
if (activity.state) descLines.push(activity.state);
|
||||
if (activity.assets?.large_text)
|
||||
descLines.push(activity.assets.large_text);
|
||||
|
|
Loading…
Reference in a new issue