Files
xiao/commands/random-res/boredom.js
T
2024-03-30 11:59:42 -04:00

27 lines
644 B
JavaScript

const Command = require('../../framework/Command');
const request = require('node-superfetch');
module.exports = class BoredomCommand extends Command {
constructor(client) {
super(client, {
name: 'boredom',
aliases: ['bored'],
group: 'random-res',
memberName: 'boredom',
description: 'Responds with a random activity to try when you\'re bored.',
credit: [
{
name: 'Bored API',
url: 'https://www.boredapi.com/',
reason: 'API'
}
]
});
}
async run(msg) {
const { body } = await request.get('https://www.boredapi.com/api/activity/');
return msg.say(`${body.activity} (${body.type})`);
}
};