-
How do I make it so that my queue can identify which user added a song? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
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 const serverQueue = message.client.queue.get(message.guild.id)
const author = serverQueue.songs[0].user |
Beta Was this translation helpful? Give feedback.
-
i have put the code to |
Beta Was this translation helpful? Give feedback.
Right now the song structure is only including the title, url, and duration, looks like this
You would need to manually input the author into it, for example:
There are 2 places you would need to edit it, in
commands > play.js
andcommands > playlist.js
Then, in this example, to access the person who added the song that's currently playing
You would do