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
@@ -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!`);
}