Fix issues

This commit is contained in:
Aslan 2025-12-28 23:23:00 +01:00
parent aebee54562
commit 2f76efed2e
2 changed files with 7 additions and 1 deletions

View file

@ -13,6 +13,12 @@ const fixUserData = (user: IUser) => {
if (!user.aiCost) {
user.aiCost = 0;
}
if (!user.lastExperienceGainTimestamp) {
user.lastExperienceGainTimestamp = 0;
}
if (!user.lastMoneyGainTimestamp) {
user.lastMoneyGainTimestamp = 0;
}
};
const getUserById = (userId: string): IUser => {

View file

@ -48,7 +48,7 @@ const onMe = (text: string, roomId: string, sender: string) => {
roomId,
"",
`<p>Your Role: <b>${user.role}</b></p></br>
<p>Your Money: <b>${user.money}</b></p></br>
<p>Your Money: <b>${user.money}$</b></p></br>
<p>Your AI Cost: <b>${user.aiCost.toFixed(2)}$</b></p></br>
<p>Your Level: <b>${level.level}</b></p></br>
<i>Next level progress: <b>${level.experienceInLevel}/${level.expToNextLevel}xp</b></i>`,