forked from Supositware/Haha-Yes
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.
25 lines
864 B
JavaScript
25 lines
864 B
JavaScript
const { Command } = require('discord.js-commando');
|
|
const fetch = require('node-fetch')
|
|
const SelfReloadJSON = require('self-reload-json');
|
|
const blacklist = require('blacklist');
|
|
|
|
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) {
|
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
|
if(blacklistJson[message.author.id])
|
|
return blacklist(blacklistJson[message.author.id] , message)
|
|
|
|
fetch('http://inspirobot.me/api?generate=true')
|
|
.then(res => res.text())
|
|
.then(body => message.channel.send({files: [body]}))
|
|
}} |