pylav.players.tracks.obj package#
Module contents#
- class pylav.players.tracks.obj.Track(node, query, skip_segments=None, requester=None, **extra)[source]#
Bases:
object
- async classmethod build_track(node, data, query, player_instance, skip_segments=None, requester=None, lazy=False, **extra)[source]#
Builds a track object from the given data.
- Parameters:
node (
None
) – The node that the track is being built for.data (
Track
|LavalinkTrackObject
|dict
|str
| None) – The data to build the track from.query (
Query
) – The query that the track was built from.skip_segments (
list`[:class:`str
]) – The segments to skip when playing the track.requester (
discord.abc.User
|int
) – The user that requested the track.lazy (
bool
) – Whether to build decode via the bot or Lavalinkplayer_instance (
Player
| None) –**extra (
Any
) – Extra data to add to the track.
- property client#
Get the client
- property encoded#
- async get_local_query_track_display_name(author_string, unknown_author, unknown_title, max_length=None)[source]#
- async get_track_display_name(max_length=None, author=True, unformatted=False, with_url=False, escape=True)[source]#
- async get_track_display_name_formatted(max_length=None, author=True, with_url=False, escape=True)[source]#
- property id#
- property last_known_position#
- async length()#
- property player#
- property requester#
- property requester_id#
- property skip_segments#
The segments to skip when playing the track.
- property timestamp#
- async to_dict()[source]#
Returns a dict representation of this Track. :returns: The dict representation of this Track. :rtype:
dict
- property unique_identifier#