XP Decay not working
Resolved
Deleted UserOPApr 9, 2025, 7:44 PMHopefully it's not some trivial error or oversight on my part - XP Decay has been doing next to nothing on my server. I enabled logging for it but got nothing. I changed and re-enabled Decay settings many times over many weeks and from what I've managed to track manually it decreased XP for some users here and there but not as much as it was meant to and in some cases they kept their role rewards even after dropping in level. Overall it seems like it's doing *something* very occasionally, but not working as intended, most of the time not working at all from what I can tell. I currently have it set to remove 1 XP per day. Logging and some manual checks still don't show it doing anything. Server ID: 1224390743133786174
CodeizeApr 9, 2025, 7:48 PMSolutionHey there again @Deleted User, it seems like Kiai is only taking
1 XPfrom users once per day.
CodeizeApr 9, 2025, 7:48 PMIt operates on this basis: docs.kiai.app/commands/settings#xp-decay-interval
CodeizeApr 9, 2025, 7:49 PMi.imgur.com/K8qJoty.png This is your current configuration as far as we can see on our end.
Deleted UserApr 9, 2025, 7:50 PMWell that's what I want it to do, but neither logging nor manually checking the level of certain users is showing that it's being done
Deleted UserApr 9, 2025, 7:51 PMI've regularly checked the xp of one particular inactive user and their XP just stayed at a certain value (72) for several weeks, at some point recently it dropped to 70 and now it's stuck at 70
CodeizeApr 9, 2025, 7:51 PMI see, let me see if I can find any further logs of Kiai's activity in your server.
- Codeizehttps://i.imgur.com/K8qJoty.png This is your current configuration as far as we can see on our end.
Deleted UserApr 9, 2025, 7:53 PMThe interval here is not expressed in seconds is it?
- Deleted UserThe interval here is not expressed in seconds is it?
CodeizeApr 9, 2025, 7:57 PMNo, that would be milliseconds, as it is easier for us to handle that way internally within the bot.
Deleted UserApr 9, 2025, 8:07 PMIf I remember correctly, when I first set it up a few months ago I did notice it working (seemingly correctly), but I'm afraid I can't offer anything other than vague and anecdotal examples
Deleted UserApr 9, 2025, 8:07 PMUnfortunately I discovered the logging option quite late
CodeizeApr 9, 2025, 8:15 PMNo worries, we're gonna do some investigating on our end :)
Deleted UserApr 9, 2025, 8:15 PMThanks!
- Deleted UserThanks!
CodeizeApr 9, 2025, 9:53 PMSo after confirming internally, there’s little room for unintended behaviour here. The only logical explanation we have based on what you’ve said is that Kiai will simply ignore any members whose total XP at the time of the decay triggering is less than the amount the decay would take away.
CodeizeApr 9, 2025, 9:54 PMDo you think that could be the case here? Or are you fairly sure that Kiai is failing to take XP away from members even if they have more XP than that of which it would take away
Deleted UserApr 9, 2025, 9:57 PM@Codeize The users I've been manually checking for xp changes have all had plenty of xp (70+) so that doesn't seem to be the case. There's also the issue of XP Decay logging not working. I've had it enabled for a while and I haven't gotten a single log message for Decay.
Deleted UserApr 9, 2025, 9:58 PMCould it be that Decay is ignoring members whose xp has been set manually?
- Deleted UserCould it be that Decay is ignoring members whose xp has been set manually?
CodeizeApr 9, 2025, 9:58 PMMost likely not, we don’t have any logic in place to account for this.
CodeizeApr 9, 2025, 9:58 PMIt not logging anything at all is weird though, I’ll do some more digging
Deleted UserApr 9, 2025, 10:00 PMI tried with two different logging channels, and I checked to see if other logs work and it seems like they do. XP gain logging works.
Deleted UserApr 9, 2025, 10:11 PMI also just checked the rank of one particular member who's been inactive for a while, I can see they've lost some xp due to Decay but then there's another problem - they haven't lost the role reward they got (specifically, they got a role for reaching level 2, now they're back to level 1 but still have the role)
Deleted UserApr 9, 2025, 10:13 PMSo from purely anecdotal evidence I seem to be having three different problems: xp decay not working in the right amounts and/or at the right interval, xp decay not sending any log messages, and users keeping their level rewards even if their level does drop
Deleted UserApr 10, 2025, 10:59 AMI'm tracking another inactive member who's close to losing their level, I'll see what happens and update
Deleted UserApr 10, 2025, 11:00 AMI think decay has been working for them, at least in the last couple of days
ShadowApr 11, 2025, 3:20 PM@Deleted User Hey there, I'm going to give you a discount code for a free month of Kiai Server Premium, one of the benefits of server premium is that you can set a custom XP decay time, and internally this works on a separate process from the free server XP decay, so this will help us track this down internally. You should get a DM from Kiai with the code shortly and you can redeem it through kiai.app/premium
Deleted UserApr 11, 2025, 8:55 PM@Shadow thanks, should I set the interval to anything specific?
- Deleted User<@439223656200273932> thanks, should I set the interval to anything specific?
ShadowApr 11, 2025, 8:59 PMNo, you can customize it however you wish for your server The way it works is that each premium server gets its own worker to process xp decay based on the interval setting you set, while all free servers just use one cron loop
Deleted UserApr 11, 2025, 9:04 PMDone, with same settings (1 xp per day)
- Deleted UserI'm tracking another inactive member who's close to losing their level, I'll see what happens and update
Deleted UserApr 12, 2025, 8:20 PMthis member's xp today dropped from 242 to 235 for some reason, reducing their level too but they haven't lost their role reward
Deleted UserApr 12, 2025, 8:21 PMshould I just disable xp decay and leave it at that or do I keep it running for more testing?
- Deleted Userthis member's xp today dropped from 242 to 235 for some reason, reducing their level too but they haven't lost their role reward
Deleted UserApr 13, 2025, 12:40 PMnow it's 231 😅
Deleted UserApr 13, 2025, 8:19 PMdropped some more for that member and I think a few others, so I've disabled it for now. idk how this became such a mess
CodeizeApr 13, 2025, 8:37 PMWe're looking into it on our end 🙏
ShadowApr 13, 2025, 10:07 PM@Deleted User ~~Are you getting XP decay logs in your kiai logging channel for that user~~
ShadowApr 13, 2025, 10:20 PMI think I may have found the issue!
ShadowApr 13, 2025, 11:20 PMXP decay should be fully working now
CodeizeApr 13, 2025, 11:25 PMThanks for helping us uncover this bug @Deleted User, enjoy the rest of your month of Kiai Premium on us, and if you have any other suggestions or bugs you know where to reach us 🙏
- CodeizeThanks for helping us uncover this bug <@456226577798135808>, enjoy the rest of your month of Kiai Premium on us, and if you have any other suggestions or bugs you know where to reach us 🙏
Answer OverflowApr 13, 2025, 11:25 PM