mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Fix lint
This commit is contained in:
@@ -82,7 +82,7 @@ module.exports = class HorseRaceCommand extends Command {
|
|||||||
return msg.reply(win ? `Nice job! Your horse won!` : 'Better luck next time!', { files: [leaderboard] });
|
return msg.reply(win ? `Nice job! Your horse won!` : 'Better luck next time!', { files: [leaderboard] });
|
||||||
}
|
}
|
||||||
|
|
||||||
async generateLeaderboard(horses, results) {
|
async generateLeaderboard(chosenHorses, results) {
|
||||||
const lb = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'horse-race', 'leaderboard.png'));
|
const lb = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'horse-race', 'leaderboard.png'));
|
||||||
const horseImg = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'horse-race', 'horse.png'));
|
const horseImg = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'horse-race', 'horse.png'));
|
||||||
const canvas = createCanvas(lb.width, lb.height);
|
const canvas = createCanvas(lb.width, lb.height);
|
||||||
@@ -93,7 +93,7 @@ module.exports = class HorseRaceCommand extends Command {
|
|||||||
ctx.textBaseline = 'middle';
|
ctx.textBaseline = 'middle';
|
||||||
for (let i = 0; i < results.length; i++) {
|
for (let i = 0; i < results.length; i++) {
|
||||||
const result = results[i];
|
const result = results[i];
|
||||||
const horse = horses.find(hor => hor.name === result.name);
|
const horse = chosenHorses.find(hor => hor.name === result.name);
|
||||||
if (colors[i]) drawImageWithTint(ctx, horseImg, colors[i], 37, 114 + (49 * i), 49, 49);
|
if (colors[i]) drawImageWithTint(ctx, horseImg, colors[i], 37, 114 + (49 * i), 49, 49);
|
||||||
ctx.font = '34px Paladins';
|
ctx.font = '34px Paladins';
|
||||||
ctx.fillText(this.formatTime(result.time), 755, 138 + (49 * i));
|
ctx.fillText(this.formatTime(result.time), 755, 138 + (49 * i));
|
||||||
|
|||||||
Reference in New Issue
Block a user