This snippet will give you a random dog fact when you type "!dogfact" in your Discord server!
// 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 facts = require('dog-facts');
if (context.params.event.content.startsWith(`!dogfact`)) {
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: `${facts.random()}`,
});
}