mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 18:05:01 +02:00
Small changes, reply to some things
This commit is contained in:
@@ -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' }] });
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user