Remove commands that no longer work, fix others

This commit is contained in:
Daniel Odendahl Jr
2019-01-31 20:02:34 +00:00
parent 649cf16709
commit 69c1b4d2cf
12 changed files with 12 additions and 139 deletions
-24
View File
@@ -1,24 +0,0 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class BirdCommand extends Command {
constructor(client) {
super(client, {
name: 'bird',
aliases: ['birb'],
group: 'random',
memberName: 'bird',
description: 'Responds with a random bird image.',
clientPermissions: ['ATTACH_FILES']
});
}
async run(msg) {
try {
const { text } = await request.get('http://random.birb.pw/tweet.json/');
return msg.say({ files: [`https://random.birb.pw/img/${JSON.parse(text).file}`] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1
View File
@@ -49,6 +49,7 @@ module.exports = class FactCommand extends Command {
format: 'json',
formatversion: 2
});
if (!body.query.random[0].title) return 'Facts are hard to find sometimes.';
return body.query.random[0].title;
}
};