Profile MusicUSER-ONLY
User Walkthrough 10 of 18
User clients can add music to their profile.
Adding Music
Use addMusicToProfile with the file identifier of an Audio.
await client.addMusicToProfile(audio.fileId);
Listing Profile Music
Use getProfileMusic with a user’s identifier to get their profile music.
const music = await client.getProfileMusic("me");
for (const audio of music) {
console.log(audio.title, audio.performer);
}
Removing Music
Use removeMusicFromProfile with the audio’s file identifier.
await client.removeMusicFromProfile(audio.fileId);