This commit is contained in:
Dragon Fire
2024-03-29 17:02:20 -04:00
parent 4c76916156
commit 8d63c7f52b
+3 -1
View File
@@ -72,7 +72,9 @@ module.exports = class PokedexBoxSpriteCommand extends Command {
const x = 40 * (this.id % 12);
const y = Math.floor(this.id / 12) * 30;
ctx.imageSmoothingEnabled = false;
ctx.drawImage(this.client.pokemon.sprites, x, y, 40, 30, 0, 0, 250, 250);
const ratio = 250 / 30;
const height = 30 * ratio;
ctx.drawImage(this.client.pokemon.sprites, x, y, 40, 30, 0, 0, 250, height);
cropToContent(ctx, canvas, canvas.width, canvas.height);
return msg.say(`#${pokemon.displayID} - ${pokemon.name}`, {
files: [{