Фикс bank

This commit is contained in:
JonnyBro 2022-01-07 23:56:34 +05:00
parent 3b820f3d68
commit 38316f30ac
2 changed files with 3 additions and 1 deletions

View file

@ -30,7 +30,9 @@ class Birthdate extends Command {
const tday = +match[0],
tmonth = +match[1] - 1;
let tyear = +match[2];
if (tyear < 100) tyear += tyear < 50 ? 2000 : 1900;
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 (d.getTime() > Date.now()) return message.error("economy/birthdate:DATE_TOO_HIGH");

View file

@ -4,6 +4,6 @@
"EXAMPLES": "{{prefix}}deposit 1000",
"MISSING_AMOUNT": "Укажите сумму!",
"NO_CREDIT": "У вас нет кредитов!",
"NO_ENOUGH_CREDIT": "У вас нет `{{money}}`!",
"NOT_ENOUGH_CREDIT": "У вас нет `{{money}}`!",
"SUCCESS": "{{money}} внесено на ваш банковский счёт!"
}