account.SaveMusic

class pyrogram.raw.functions.account.SaveMusic

Adds or removes a song from the current user’s profile see here » for more info on the music tab of the profile page.

Details:
  • Layer: 223

  • ID: B26732A9

Parameters:
  • id (InputDocument) – The song to add or remove; can be an already added song when reordering songs with after_id. Adding an already added song will never re-add it, only move it to the top of the song list (or after the song passed in after_id).

  • unsave (bool, optional) – If set, removes the song.

  • after_id (InputDocument, optional) – If set, the song will be added after the passed song (must be already pinned on the profile).

Returns:

bool

TL Schema

account.saveMusic#b26732a9
flags:#
unsave:flags.0?true
id:InputDocument
after_id:flags.1?InputDocument

= Bool

Parameter Tree

SaveMusic
├── unsavetrue (optional)
├── idInputDocument
│ ├── InputDocumentEmpty
│ └── InputDocument
│ ├── idlong
│ ├── access_hashlong
│ └── file_referencebytes
└── after_idInputDocument (optional)
└── InputDocument
├── idlong
├── access_hashlong
└── file_referencebytes

Example

await app.invoke(
    SaveMusic(
        unsave=None,
        id=InputDocumentEmpty(),
        after_id=InputDocumentEmpty(),
    )
)