Are you bored? Do not worry, !bored will give you a random task that will help you spend your time!
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let info = await lib.http.request['@1.1.5'].get({
url: `https://www.boredapi.com/api/activity`,
});
if (context.params.event.content.trim() === `!bored`) {
let message = await lib.discord.channels['@0.1.1'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: '',
tts: false,
embed: {
type: 'rich',
title: `Bored? Try this out:`,
description: `**Activity:** ${info.data.activity} \n **Type:** ${info.data.type} \n **Participants required:** ${info.data.participants}`,
color: 0xb67afb,
},
});
}