【发布时间】:2022-12-19 03:25:14
【问题描述】:
I would like to map an array inside .addOptions.
Basically, I would like to add a value { } to addOptions by taking the values of an object or array.
Examples:
let menu = new SelectMenuBuilder()
.setCustomId('select')
.setPlaceholder('Nothing selected')
.addOptions(arrayt.map(song => label: song.name, description: song.formattedDuration, value: blabla)
【问题讨论】:
-
Could you provide an example of how your array look like
-
its like [ { id: '8kcdvlgR1Uw', url: 'youbew', }, { id: 'n61ULEU7CO0', name: 'Best of lofi ', } ]
标签: node.js discord discord.js