This snippet contains a prefix command called "random" that generates a number randomly from 1-100000 and sends it back to your channel in an embed.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
if (context.params.event.content.startsWith(`${process.env.PREFIX}random`))
await lib.discord.channels['@0.2.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embeds: [
{
type: 'rich',
title: `Your random number is here:`,
description: `${Math.floor(Math.random() * 100000) + 1}`,
color: 0xff0000,
},
],
});