mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Style changes
This commit is contained in:
@@ -44,8 +44,7 @@ module.exports = class MemeCommand extends Command {
|
||||
|
||||
async run(msg, { type, top, bottom }) {
|
||||
try {
|
||||
const memes = await snekfetch
|
||||
.get('https://api.imgflip.com/get_memes');
|
||||
const memes = await snekfetch.get('https://api.imgflip.com/get_memes');
|
||||
const memeList = memes.body.data.memes;
|
||||
if (type === 'list') return msg.say(list(memeList.map(meme => meme.name), 'or'), { split: { char: ' ' } });
|
||||
if (!memeList.some(meme => meme.name.toLowerCase() === type)) {
|
||||
|
||||
@@ -22,8 +22,7 @@ module.exports = class RobohashCommand extends Command {
|
||||
|
||||
async run(msg, { text }) {
|
||||
try {
|
||||
const { body } = await snekfetch
|
||||
.get(`https://robohash.org/${text}`);
|
||||
const { body } = await snekfetch.get(`https://robohash.org/${text}`);
|
||||
return msg.say({ files: [{ attachment: body, name: 'robohash.png' }] });
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
|
||||
Reference in New Issue
Block a user