I am creating a music bot for Discord and I seem to have stumbled in to a problem with the music queue. Whenever I want to see the queue, the songs are presented with a - before the name. I wish for the songs to be automatically numbered.
I have looked everywhere, including videos on youtube and tutorials. I still have no idea how to do it.
const serverQueue = message.client.queue.get(message.guild.id);
if (!serverQueue)
return message.channel.send(embed1);
const embedq = new Discord.RichEmbed()
.setTitle(`**Now playing:** ${serverQueue.songs[0].title}`)
.setDescription(`${serverQueue.songs.map(song => `${song.title}`).join('\n')}`)
I expect the output of the queue to look like this:
1) Joyner Lucas ft. Logic - ISIS
2) KSHMR x KAAZE - Devil Inside Me
However the actual output is
- Joyner Lucas ft. Logic - ISIS
(song, i) => `${i+1}) ${song.title}`instead ofsong => `${song.title}`what you want?