mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 14:44:58 +05:00
Фикс bank
This commit is contained in:
parent
3b820f3d68
commit
38316f30ac
2 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,9 @@ class Birthdate extends Command {
|
||||||
const tday = +match[0],
|
const tday = +match[0],
|
||||||
tmonth = +match[1] - 1;
|
tmonth = +match[1] - 1;
|
||||||
let tyear = +match[2];
|
let tyear = +match[2];
|
||||||
|
|
||||||
if (tyear < 100) tyear += tyear < 50 ? 2000 : 1900;
|
if (tyear < 100) tyear += tyear < 50 ? 2000 : 1900;
|
||||||
|
|
||||||
const d = new Date(tyear, tmonth, tday);
|
const d = new Date(tyear, tmonth, tday);
|
||||||
if (!(tday == d.getDate() && tmonth == d.getMonth() && tyear == d.getFullYear())) return message.error("economy/birthdate:INVALID_DATE");
|
if (!(tday == d.getDate() && tmonth == d.getMonth() && tyear == d.getFullYear())) return message.error("economy/birthdate:INVALID_DATE");
|
||||||
if (d.getTime() > Date.now()) return message.error("economy/birthdate:DATE_TOO_HIGH");
|
if (d.getTime() > Date.now()) return message.error("economy/birthdate:DATE_TOO_HIGH");
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
"EXAMPLES": "{{prefix}}deposit 1000",
|
"EXAMPLES": "{{prefix}}deposit 1000",
|
||||||
"MISSING_AMOUNT": "Укажите сумму!",
|
"MISSING_AMOUNT": "Укажите сумму!",
|
||||||
"NO_CREDIT": "У вас нет кредитов!",
|
"NO_CREDIT": "У вас нет кредитов!",
|
||||||
"NO_ENOUGH_CREDIT": "У вас нет `{{money}}`!",
|
"NOT_ENOUGH_CREDIT": "У вас нет `{{money}}`!",
|
||||||
"SUCCESS": "{{money}} внесено на ваш банковский счёт!"
|
"SUCCESS": "{{money}} внесено на ваш банковский счёт!"
|
||||||
}
|
}
|
Loading…
Reference in a new issue