Example of a handler for a select menu interaction. You must set the "custom_id" in the event trigger to match the custom id of the select menu you want your endpoint to respond to.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
await lib.discord.channels['@0.1.2'].messages.update({
message_id: context.params.event.message.id,
channel_id: context.params.event.message.channel_id,
content: context.params.event.message.content,
embed: context.params.event.message.embeds[0],
});
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: [
`You selected items from a select menu! Here's the values that you picked:`,
'',
context.params.event.data.values.join('\n'),
].join('\n'),
});