2020-03-26 04:31:32 +00:00
|
|
|
const fetch = require("node-fetch")
|
2020-03-09 01:11:33 +00:00
|
|
|
exports.run = async (client, message) => {
|
|
|
|
message.channel.startTyping();
|
2020-03-26 04:31:32 +00:00
|
|
|
try {
|
|
|
|
fetch('http://inspirobot.me/api?generate=true')
|
|
|
|
.then(res => res.text())
|
|
|
|
.then(body => message.channel.send({files: [new Discord.MessageAttachment(body)]}));
|
|
|
|
message.channel.stopTyping();
|
|
|
|
} catch (err) {
|
|
|
|
message.channel.send(`<:error:466995152976871434> An error has occurred: ${err}`)
|
|
|
|
message.channel.stopTyping();
|
|
|
|
};
|
2020-03-09 01:11:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.conf = {
|
|
|
|
enabled: true,
|
|
|
|
guildOnly: false,
|
2020-03-11 10:46:13 +00:00
|
|
|
aliases: ["inspire"],
|
2020-03-09 01:11:33 +00:00
|
|
|
permLevel: "User",
|
|
|
|
requiredPerms: []
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.help = {
|
|
|
|
name: "inspirobot",
|
|
|
|
category: "Fun",
|
|
|
|
description: "Returns an inspirational message generated by inspirobot.",
|
|
|
|
usage: "inspirobot"
|
|
|
|
};
|