mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 08:22:22 +02:00
Fix
This commit is contained in:
@@ -94,9 +94,9 @@ module.exports = class HorseRaceCommand extends Command {
|
|||||||
for (let i = 0; i < horses.length; i++) {
|
for (let i = 0; i < horses.length; i++) {
|
||||||
const horse = horses[i];
|
const horse = horses[i];
|
||||||
const result = results.find(result => horse.name === result.name).time;
|
const result = results.find(result => horse.name === result.name).time;
|
||||||
if (colors[i]) drawImageWithTint(ctx, horseImg, colors[i], 37, 114 * i, 49, 49);
|
if (colors[i]) drawImageWithTint(ctx, horseImg, colors[i], 37, 114 + (horseImg.height * i), 49, 49);
|
||||||
ctx.fillText(this.formatTime(result), 138, 755 * i);
|
ctx.fillText(this.formatTime(result), 755, 138 + (49 * i));
|
||||||
ctx.fillText(horse.name, 138, 251 * i);
|
ctx.fillText(horse.name, 755, 251 + (49 * i));
|
||||||
}
|
}
|
||||||
return { attachment: canvas.toBuffer(), name: 'leaderboard.png' };
|
return { attachment: canvas.toBuffer(), name: 'leaderboard.png' };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user