From e38ff1ec10934e92af0d7c82863296ab5dce6efa Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Wed, 19 Jan 2022 19:44:54 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Fun/horserace.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/Fun/horserace.js b/commands/Fun/horserace.js index 81741269..b7af9921 100644 --- a/commands/Fun/horserace.js +++ b/commands/Fun/horserace.js @@ -19,13 +19,13 @@ class Horserace extends Command { } async run(message, args, data) { - if (!args[0]) return message.sendT("fun/horserace:MISSING_STATUS"); + if (!args[0]) return message.error("fun/horserace:MISSING_STATUS"); const author = message.author; if (args[0] === "create") { let thisGame = games[message.channel.id]; - if (thisGame) message.sendT("fun/horserace:GAME_RUNNING"); + if (thisGame) message.error("fun/horserace:GAME_RUNNING"); else { games[message.channel.id] = { horseSpeeds: [], @@ -62,8 +62,8 @@ class Horserace extends Command { const horse = parseInt(args[1]); const amount = parseInt(args[2]); - if (horse > 5) return message.sendT("fun/horserace:HORSE_NUM"); - if (!thisGame) return message.sendT("fun/horserace:NO_GAME_RUNNING"); + if (horse > 5) return message.error("fun/horserace:HORSE_NUM"); + if (!thisGame) return message.error("fun/horserace:NO_GAME_RUNNING"); if (!amount || isNaN(amount) || parseInt(amount, 10) <= 0) return message.error("economy/pay:INVALID_AMOUNT"); if (amount > data.memberData.money) return message.error("economy/pay:ENOUGH_MONEY", { @@ -85,7 +85,7 @@ class Horserace extends Command { const thisGame = games[message.channel.id]; const horsePositions = [0, 0, 0, 0, 0]; - if (!thisGame) return message.sendT("fun/horserace:NO_GAME_RUNNING"); + if (!thisGame) return message.error("fun/horserace:NO_GAME_RUNNING"); // eslint-disable-next-line no-constant-condition while (true) {