From 301e9d1783e51574e71306d1274c6b64b5816bc4 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 26 Sep 2018 23:44:56 +0000 Subject: [PATCH] Fix bird --- commands/random/bird.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/random/bird.js b/commands/random/bird.js index 33e97759..8d1042cd 100644 --- a/commands/random/bird.js +++ b/commands/random/bird.js @@ -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!`); }