A prefix command to get a random 'fact/joke' about chuck norris! [!chuck]
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let result = await lib.http.request['@1.1.6'].get({
url: `https://api.chucknorris.io/jokes/random`,
});
await lib.discord.channels['@0.3.0'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
embed: {
title: '',
type: 'rich',
color: 0x000000,
description: `**${result.data.value}**`,
timestamp: new Date().toISOString(),
},
});