You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/commands/fun/ib.js

24 lines
588 B
JavaScript

const { Command } = require('discord-akairo');
const fetch = require('node-fetch');
class InspiroBotCommand extends Command {
constructor() {
super('InspiroBot', {
aliases: ['inspirobot', 'ib'],
category: 'fun',
clientPermissions: ['SEND_MESSAGES', 'ATTACH_FILES'],
description: {
content: 'Send images from Inspirobot',
usage: '',
examples: ['']
}
});
}
async exec(message) {
fetch('http://inspirobot.me/api?generate=true')
.then(res => res.text())
.then(body => message.channel.send({files: [body]}));
}
}
module.exports = InspiroBotCommand;