This commit is contained in:
Daniel Odendahl Jr
2018-09-26 23:44:56 +00:00
parent 7612e66aec
commit 301e9d1783
+2 -2
View File
@@ -15,8 +15,8 @@ module.exports = class BirdCommand extends Command {
async run(msg) {
try {
const { body } = await request.get('http://random.birb.pw/tweet.json/');
return msg.say({ files: [{ attachment: `http://random.birb.pw/img/${body.file}`, name: body.file }] });
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!`);
}