mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 05:49:49 +02:00
Fix
This commit is contained in:
@@ -33,10 +33,7 @@ module.exports = class AchievementCommand extends Command {
|
||||
h: 'Achievement Get!',
|
||||
t: text
|
||||
});
|
||||
return msg.say({ files: [{
|
||||
attachment: body,
|
||||
name: 'achievement.png'
|
||||
}] });
|
||||
return msg.say({ files: [{ attachment: body, name: 'achievement.png' }] });
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
|
||||
@@ -46,10 +46,7 @@ module.exports = class BeLikeBillCommand extends Command {
|
||||
Be like ${name}.
|
||||
`;
|
||||
ctx.fillText(text, 31, 80);
|
||||
return msg.say({ files: [{
|
||||
attachment: canvas.toBuffer(),
|
||||
name: 'be-like-bill.png'
|
||||
}] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'be-like-bill.png' }] });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -30,9 +30,6 @@ module.exports = class ColorCommand extends Command {
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.fillStyle = color;
|
||||
ctx.fillRect(0, 0, 250, 250);
|
||||
return msg.say({ files: [{
|
||||
attachment: canvas.toBuffer(),
|
||||
name: 'color.png'
|
||||
}] });
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'color.png' }] });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,10 +45,7 @@ module.exports = class MemeCommand extends Command {
|
||||
const search = await snekfetch.get(`https://memegen.link/api/search/${type}`);
|
||||
if (!search.body.length) return msg.say('Could not find any results.');
|
||||
const { body } = await snekfetch.get(search.body[0].template.blank.replace(/\/_/, `/${top}/${bottom}`));
|
||||
return msg.say({ files: [{
|
||||
attachment: body,
|
||||
name: 'meme.jpg'
|
||||
}] });
|
||||
return msg.say({ files: [{ attachment: body, name: 'meme.jpg' }] });
|
||||
} catch (err) {
|
||||
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
|
||||
@@ -23,10 +23,7 @@ module.exports = class RobohashCommand extends Command {
|
||||
async run(msg, { text }) {
|
||||
try {
|
||||
const { body } = await snekfetch.get(`https://robohash.org/${text}`);
|
||||
return msg.say({ files: [{
|
||||
attachment: body,
|
||||
name: 'robohash.png'
|
||||
}] });
|
||||
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