1
0
Fork 0
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

23 lines
736 B
JavaScript

6 years ago
const { Command } = require('discord.js-commando');
const fetch = require('node-fetch')
const blacklist = require('../../json/blacklist.json')
6 years ago
module.exports = class BadMemeCommand extends Command {
constructor(client) {
super(client, {
name: 'ib',
aliases: ['inspirobot'],
group: 'fun',
memberName: 'ib',
description: `Return a random inspiration from inspirobot`,
});
}
async run(message) {
if(blacklist[message.author.id])
return message.channel.send("You are blacklisted")
6 years ago
fetch('http://inspirobot.me/api?generate=true')
.then(res => res.text())
.then(body => message.channel.send({files: [body]}))
}}