This commit is contained in:
Daniel Odendahl Jr
2018-09-26 23:42:51 +00:00
parent d4be43bfd7
commit 7612e66aec
+1 -1
View File
@@ -16,7 +16,7 @@ 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: [`http://random.birb.pw/img/${body.file}`] });
return msg.say({ files: [{ attachment: `http://random.birb.pw/img/${body.file}`, name: body.file }] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}