Ask the bot to choose between two options like this: -choose option one, option two. It will provide a random selection between your two inputs.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let queries = context.params.event.content
.split(' ')
.splice(1)
.join(' ')
.split(', ');
let random = queries[Math.floor(Math.random() * queries.length)];
if (context.params.event.content.startsWith('-choose')) {
if (queries.length > 1) {
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `I choose: ${random}`,
});
} else {
await lib.discord.channels['@0.1.2'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `You have to provide at least two options`,
});
}
}