Send a random message from a list of prompts
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
// To add more answers for your command, simply add them to this list!
let messagePrompts = [
'I think dogs should be allowed to vote! π',
'Pineapple on pizza is kinda gross. π€’',
'A hotdog is indeed a sandwich. π',
];
if (context.params.event.content.trim() === `${process.env.PREFIX}random`) {
let messageChoice = Math.floor(Math.random() * messagePrompts.length);
let message = messagePrompts[messageChoice];
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${message}`
});
}