Skip to content

Queue: How to display which user added a song #240

Answered by brandonst
xenodirt asked this question in General
Discussion options

You must be logged in to vote

Right now the song structure is only including the title, url, and duration, looks like this

song = {
    title: songInfo.videoDetails.title,
    url: songInfo.videoDetails.video_url,
    duration: songInfo.videoDetails.lengthSeconds
}

You would need to manually input the author into it, for example:

song = {
    title: songInfo.videoDetails.title,
    url: songInfo.videoDetails.video_url,
    duration: songInfo.videoDetails.lengthSeconds,
    user: message.author.tag
}

There are 2 places you would need to edit it, in commands > play.js and commands > playlist.js
Then, in this example, to access the person who added the song that's currently playing
You would do

const serverQueue = message.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@aimankhairy
Comment options

@brandonst
Comment options

Answer selected by xenodirt
Comment options

You must be logged in to vote
1 reply
@brandonst
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants