mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 08:22:22 +02:00
Fix lint
This commit is contained in:
@@ -27,12 +27,12 @@ module.exports = class FontCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { font, text }) {
|
||||
const image = await this.generateImage(font, text);
|
||||
run(msg, { font, text }) {
|
||||
const image = this.generateImage(font, text);
|
||||
return msg.say({ files: [{ attachment: image, name: `${font.filenameNoExt}.png` }] });
|
||||
}
|
||||
|
||||
async generateImage(font, text) {
|
||||
generateImage(font, text) {
|
||||
const canvasPre = createCanvas(1, 1);
|
||||
const ctxPre = canvasPre.getContext('2d');
|
||||
ctxPre.font = this.client.fonts.get(font.filename).toCanvasString(50);
|
||||
|
||||
@@ -39,7 +39,7 @@ module.exports = class JeopardyQuestionCommand extends Command {
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { text }) {
|
||||
run(msg, { text }) {
|
||||
const canvas = createCanvas(1280, 720);
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.fillStyle = '#030e78';
|
||||
|
||||
Reference in New Issue
Block a user