Answer the question
In order to leave comments, you need to log in
Timeout issues?
let time = rand(5,20)
let time1 = time * 1000
let time2 = time1 / 1000
user.balance += rybes;
if (user.job >= 1){
return msg.send (`Ваш персонаж всё еще работает.`)
}
else if (user.job <= 0){
user.job += 1
user.save()
msg.send(`Ваш персонаж начал работу, время работы составляет ${time} секунд.`)
setTimeout (() =>{
msg.send(`${randomSmile} Вы закончили работать и заработали: ${rybes}\n---Для просмотра баланса пишите: Баланс`)
}, time1)
}
user.job -= 1
});
Answer the question
In order to leave comments, you need to log in
In the penultimate line, the job is subtracted in any case, probably the problem is this.
user.job -= 1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question