Haha-Yes/commands/general/ib.js

23 lines
535 B
JavaScript
Raw Normal View History

2018-12-30 01:20:24 +01:00
const { Command } = require('discord-akairo');
const fetch = require('node-fetch');
class InspiroBotCommand extends Command {
2019-01-02 08:09:45 +01:00
constructor() {
super('InspiroBot', {
aliases: ['inspirobot', 'ib'],
category: 'general',
description: {
2018-12-30 01:20:24 +01:00
content: 'Send images from Inspirobot',
usage: '',
examples: ['']
}
2019-01-02 08:09:45 +01:00
});
}
2018-12-30 01:20:24 +01:00
2019-01-02 08:09:45 +01:00
async exec(message) {
fetch('http://inspirobot.me/api?generate=true')
.then(res => res.text())
.then(body => message.channel.send({files: [body]}));
}
2018-12-30 01:20:24 +01:00
}
module.exports = InspiroBotCommand;