Skip to content

Skip N number of songs in queue #285

Answered by SpookyO
solumath asked this question in Q&A
Discussion options

You must be logged in to vote

Well, track_start event ONLY triggers when bot plays something with Player.play and you do it for the first time and while autoplay is enabled, library does it for you which triggers track_start even though you are not calling play method. Queue.get() Only gets next song from queue and puts in history, it has nothing to do with the API. And thus, it doesn't trigger track_start event, give yourself a try!

Update: was bit wrong about putting tracks to history while getting track from queue. You have to put track to history manually by using Queue.history.put()

for i in range(N):
  t=player.queue.get()
  player.queue.history.put(t)
....

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@solumath
Comment options

@SpookyO
Comment options

Answer selected by solumath
@solumath
Comment options

@solumath
Comment options

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