mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 00:07:36 +02:00
Meow
This commit is contained in:
@@ -42,6 +42,6 @@ module.exports = class MemeCommand extends Command {
|
||||
return msg.say('This Command requires the `Attach Files` Permission.');
|
||||
const { type, top, bottom } = args;
|
||||
return msg.channel.send({ files: [`https://memegen.link/${type}/${top}/${bottom}.jpg`] })
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(err));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,6 +15,6 @@ module.exports = class SpamCommand extends Command {
|
||||
if (!msg.channel.permissionsFor(this.client.user).has('ATTACH_FILES'))
|
||||
return msg.say('This Command requires the `Attach Files` Permission.');
|
||||
return msg.channel.send({ files: ['https://i.imgur.com/2JFu5xE.jpg'] })
|
||||
.catch(err => msg.say(`An Error Occurred: ${err}`));
|
||||
.catch(err => msg.say(err));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ module.exports = class StrawpollCommand extends Command {
|
||||
http://strawpoll.me/${body.id}
|
||||
`);
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,16 +22,16 @@ module.exports = class TodayCommand extends Command {
|
||||
.buffer(true);
|
||||
const parsed = JSON.parse(text);
|
||||
const events = parsed.data.Events;
|
||||
const random = Math.floor(Math.random() * events.length);
|
||||
const event = events[Math.floor(Math.random() * events.length)];
|
||||
const embed = new RichEmbed()
|
||||
.setColor(0x9797FF)
|
||||
.setURL(parsed.url)
|
||||
.setTitle(`On this day (${parsed.date})...`)
|
||||
.setTimestamp()
|
||||
.setDescription(`${events[random].year}: ${events[random].text}`);
|
||||
.setDescription(`${event.year}: ${event.text}`);
|
||||
return msg.embed(embed);
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = class WouldYouRatherCommand extends Command {
|
||||
.setDescription(`${body.choicea} OR ${body.choiceb}?`);
|
||||
return msg.embed(embed);
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user