Skip to content
Discussion options

You must be logged in to vote

Heya!

Switching to a Lavalink server, specifically using Wavelink can easily handle 100+ players listening to high quality MP3 audio. Using Wavelink's built in functions, you can easily get the specific timestamp and current progress in the current track, song, or playlist. If I'm not mistaken, either Rhythm or Groovy Bot use a Lavalink server (not Python).

Let's run through a quick implementation for fetching current progress and timestamp.

@bot.command()
async def timestamp(ctx):
    player = bot.wavelink.get_player(ctx.guild.id)
    pos = player.position  # The players seek position in the currently playing track in milliseconds. 
    
    # In order to get total track time, you would …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Luc1412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants