This commit is contained in:
Dragon Fire
2024-05-03 10:28:55 -04:00
parent e92f705824
commit 6dbd29cb03
158 changed files with 158 additions and 159 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ module.exports = class CaptchaCommand extends Command {
ctx.strokeText(text, 15, 26);
await msg.reply(
'**You have 15 seconds, what does the captcha say?**',
{ files: [{ attachment: canvas.toBuffer(), name: 'captcha-quiz.png' }] }
{ files: [{ attachment: canvas.toBuffer('image/png'), name: 'captcha-quiz.png' }] }
);
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
+1 -1
View File
@@ -107,6 +107,6 @@ module.exports = class HorseRaceCommand extends Command {
ctx.font = this.client.fonts.get('Paladins.otf').toCanvasString(15);
ctx.fillText(horse.name, 251, 138 + (49 * i));
}
return { attachment: canvas.toBuffer(), name: 'leaderboard.png' };
return { attachment: canvas.toBuffer('image/png'), name: 'leaderboard.png' };
}
};
+1 -1
View File
@@ -88,6 +88,6 @@ module.exports = class JeopardyCommand extends Command {
ctx.fillStyle = 'white';
ctx.fillText(lines[i], canvas.width / 2, height);
}
return canvas.toBuffer();
return canvas.toBuffer('image/png');
}
};
+1 -1
View File
@@ -147,7 +147,7 @@ module.exports = class PokemonAdvantageCommand extends Command {
ctx.fillText(pokemon1.name, 128, 250, 175);
ctx.strokeText(pokemon2.name, 348, 250, 175);
ctx.fillText(pokemon2.name, 348, 250, 175);
return { attachment: canvas.toBuffer(), name };
return { attachment: canvas.toBuffer('image/png'), name };
}
calculateAdvantage(pkmn1, pkmn2) {
+1 -1
View File
@@ -80,6 +80,6 @@ module.exports = class TypingTestCommand extends Command {
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = 'black';
ctx.fillText(sentence, canvas.width / 2, canvas.height / 2);
return canvas.toBuffer();
return canvas.toBuffer('image/png');
}
};
+1 -1
View File
@@ -149,6 +149,6 @@ module.exports = class WhosThatPokemonCommand extends Command {
ctx.fillStyle = '#3c5aa6';
ctx.fillText(pokemon.name, 362, 158, 240);
}
return { attachment: canvas.toBuffer(), name };
return { attachment: canvas.toBuffer('image/png'), name };
}
};