mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 21:44:48 +02:00
Fix
This commit is contained in:
@@ -202,8 +202,10 @@ module.exports = class CarRaceCommand extends Command {
|
|||||||
}
|
}
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
const winner = userCarSpaces > oppoCarSpaces ? msg.author : opponent;
|
const winner = userCarSpaces > oppoCarSpaces ? msg.author : opponent;
|
||||||
const car = winner.id === msg.author.id ? car : car2;
|
const winnerCar = winner.id === msg.author.id ? car : car2;
|
||||||
return msg.say(`Congrats, ${winner}!`, { files: [car2] });
|
return msg.say(`Congrats, ${winner}!`, {
|
||||||
|
files: [path.join(__dirname, '..', '..', 'assets', 'json', 'car-race', 'cars', `${winnerCar}.png`)]
|
||||||
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
Reference in New Issue
Block a user