A Discord prefix command that generates random words similar to superb e.g "Legendary" by doing !superb. Good for writing or when you don't know what to say to someone. Enjoy
// authenticates you with the API standard library
// type `await lib.` to display API autocomplete
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
const superb = require('superb');
let msg = context.params.event.content;
let word = superb.random();
if (context.params.event.content.startsWith('!superb')) {
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
embed: {
title: ``,
description: word,
color: 0xffffff,
},
});
}