Can someone please sanity check this, for some reason the actionRow gives the error TypeError: Cannot read properties of undefined (reading 'toJSON') and im too tired to see why lol
message.addTextDisplayComponents([
(textDisplay: Discord.TextDisplayBuilder)=> textDisplay
.setContent(`## What is the airspeed velocity of an unladen swallow?`)
])
message.addActionRowComponents((actionRow: Discord.ActionRowBuilder) => {
actionRow.setComponents(
new Discord.StringSelectMenuBuilder()
.setCustomId("teams-events-trivia")
.setPlaceholder("Select an Answer")
.setOptions([
new Discord.StringSelectMenuOptionBuilder()
.setLabel("An African or European swallow?")
.setValue("1"),
new Discord.StringSelectMenuOptionBuilder()
.setLabel("42MPH")
.setValue("2"),
new Discord.StringSelectMenuOptionBuilder()
.setLabel("What?")
.setValue("3"),
])
)
})
4am peak coding hours does have its drawbacks, cheers


I check, thanks
Popular Topics: Display Components - Section


v10: RoutesDeclarations
Component Reference - Section



thanks i wouldnt have thought of it