forked from Supositware/Haha-Yes
Added inspirobot
This commit is contained in:
parent
0d17296fd4
commit
c2592fbe88
1 changed files with 23 additions and 0 deletions
23
commands/fun/ib.js
Normal file
23
commands/fun/ib.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
const { Command } = require('discord.js-commando');
|
||||||
|
const fetch = require('node-fetch')
|
||||||
|
const blacklist = require('../../json/blacklist.json')
|
||||||
|
|
||||||
|
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")
|
||||||
|
|
||||||
|
fetch('http://inspirobot.me/api?generate=true')
|
||||||
|
.then(res => res.text())
|
||||||
|
.then(body => message.channel.send({files: [body]}))
|
||||||
|
}}
|
Loading…
Reference in a new issue