mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 16:19:12 +02:00
Fix bird
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = class BirdCommand extends Command {
|
|||||||
async run(msg) {
|
async run(msg) {
|
||||||
try {
|
try {
|
||||||
const { body } = await request.get('http://random.birb.pw/tweet.json/');
|
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) {
|
} catch (err) {
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user