More Stoof

This commit is contained in:
Daniel Odendahl Jr
2017-10-13 17:33:29 +00:00
parent 76111000b5
commit 981f59b1b1
40 changed files with 228 additions and 125 deletions
+4 -1
View File
@@ -23,7 +23,10 @@ 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!`);
}