Small changes, reply to some things

This commit is contained in:
Daniel Odendahl Jr
2017-10-24 19:02:27 +00:00
parent e0594c8749
commit c225ea4659
141 changed files with 251 additions and 254 deletions
+2 -3
View File
@@ -37,15 +37,14 @@ module.exports = class BeLikeBillCommand extends Command {
const ctx = canvas.getContext('2d');
ctx.drawImage(base, 0, 0);
ctx.font = '23px Noto';
const text = stripIndents`
ctx.fillText(stripIndents`
This is ${name}.
${texts[Math.floor(Math.random() * texts.length)].replace(/{{name}}/gi, name)}
${name} is smart.
Be like ${name}.
`;
ctx.fillText(text, 31, 80);
`, 31, 80);
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'be-like-bill.png' }] });
}
};
+1 -1
View File
@@ -47,7 +47,7 @@ module.exports = class MemeCommand extends Command {
const { body } = await snekfetch.get(search.body[0].template.blank.replace(/\/_/, `/${top}/${bottom}`));
return msg.say({ files: [{ attachment: body, name: 'meme.jpg' }] });
} catch (err) {
return msg.say(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -25,7 +25,7 @@ module.exports = class RobohashCommand extends Command {
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!`);
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};