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 artworkUrl()[source]#
classmethod attach_client(client)[source]#
async author()[source]#
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 Lavalink

  • player_instance (Player | None) –

  • **extra (Any) – Extra data to add to the track.

property client#

Get the client

async duration()[source]#
property encoded#
async fetch_full_track_data()[source]#
async get_embedded_artwork()[source]#
async get_external_query_track_display_name(author_string, max_length=None)[source]#
async get_full_track_display_name(max_length=None, author=True)[source]#
async get_local_query_track_display_name(author_string, unknown_author, unknown_title, max_length=None)[source]#
async get_mixplaylist_url()[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]#
async get_track_display_name_unformatted(max_length=None, author=True, escape=True)[source]#
property id#
async identifier()[source]#
async info()[source]#
async is_album()[source]#
async is_apple_music()[source]#
async is_bandcamp()[source]#
async is_clypit()[source]#
async is_deezer()[source]#
async is_gctts()[source]#
async is_getyarn()[source]#
async is_http()[source]#
async is_local()[source]#
async is_mixcloud()[source]#
async is_niconico()[source]#
async is_ocremix()[source]#
async is_playlist()[source]#
async is_pornhub()[source]#
async is_reddit()[source]#
async is_seekable()[source]#
async is_single()[source]#
async is_soundcloud()[source]#
async is_soundgasm()[source]#
async is_speak()[source]#
async is_spotify()[source]#
async is_tiktok()[source]#
async is_twitch()[source]#
async is_vimeo()[source]#
async is_youtube()[source]#
async is_youtube_music()[source]#
async isrc()[source]#
property last_known_position#
async length()#
async mix_playlist_url()[source]#
property player#
async probe_info()[source]#
async query()[source]#
async query_identifier()[source]#
async query_source()[source]#
property requester#
property requester_id#
async requires_capability()[source]#
async search(bypass_cache=False)[source]#
async search_all(player, requester, bypass_cache=False)[source]#
property skip_segments#

The segments to skip when playing the track.

async source()[source]#
async stream()[source]#
property timestamp#
async title()[source]#
async to_dict()[source]#

Returns a dict representation of this Track. :returns: The dict representation of this Track. :rtype: dict

property unique_identifier#
async uri()[source]#