This commit is contained in:
Daniel Odendahl Jr
2017-10-13 17:49:26 +00:00
parent a673fb43fa
commit b57e817988
34 changed files with 35 additions and 133 deletions
+1 -4
View File
@@ -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!`);
}
+1 -4
View File
@@ -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' }] });
}
};
+1 -4
View File
@@ -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' }] });
}
};
+1 -4
View File
@@ -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!`);
}
+1 -4
View File
@@ -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!`);
}