XP Decay not working

Resolved
  1. Deleted UserOPApr 9, 2025, 7:44 PM

    Hopefully 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

  2. CodeizeApr 9, 2025, 7:48 PMSolution

    Hey there again @Deleted User, it seems like Kiai is only taking 1 XP from users once per day.

  3. CodeizeApr 9, 2025, 7:48 PM
  4. CodeizeApr 9, 2025, 7:49 PM

    i.imgur.com/K8qJoty.png This is your current configuration as far as we can see on our end.

  5. Deleted UserApr 9, 2025, 7:50 PM

    Well 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

  6. Deleted UserApr 9, 2025, 7:51 PM

    I'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

  7. CodeizeApr 9, 2025, 7:51 PM

    I see, let me see if I can find any further logs of Kiai's activity in your server.

  8. 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 PM

    The interval here is not expressed in seconds is it?

  9. Deleted UserThe interval here is not expressed in seconds is it?
    CodeizeApr 9, 2025, 7:57 PM

    No, that would be milliseconds, as it is easier for us to handle that way internally within the bot.

  10. Deleted UserApr 9, 2025, 8:07 PM

    If 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

  11. Deleted UserApr 9, 2025, 8:07 PM

    Unfortunately I discovered the logging option quite late

  12. CodeizeApr 9, 2025, 8:15 PM

    No worries, we're gonna do some investigating on our end :)

  13. Deleted UserApr 9, 2025, 8:15 PM

    Thanks!

  14. Deleted UserThanks!
    CodeizeApr 9, 2025, 9:53 PM

    So 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.

  15. CodeizeApr 9, 2025, 9:54 PM

    Do 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

  16. 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.

  17. Deleted UserApr 9, 2025, 9:58 PM

    Could it be that Decay is ignoring members whose xp has been set manually?

  18. Deleted UserCould it be that Decay is ignoring members whose xp has been set manually?
    CodeizeApr 9, 2025, 9:58 PM

    Most likely not, we don’t have any logic in place to account for this.

  19. CodeizeApr 9, 2025, 9:58 PM

    It not logging anything at all is weird though, I’ll do some more digging

  20. Deleted UserApr 9, 2025, 10:00 PM

    I 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.

  21. Deleted UserApr 9, 2025, 10:11 PM

    I 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)

  22. Deleted UserApr 9, 2025, 10:13 PM

    So 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

  23. Deleted UserApr 10, 2025, 10:59 AM

    I'm tracking another inactive member who's close to losing their level, I'll see what happens and update

  24. Deleted UserApr 10, 2025, 11:00 AM

    I think decay has been working for them, at least in the last couple of days

  25. 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

  26. Deleted UserApr 11, 2025, 8:55 PM

    @Shadow thanks, should I set the interval to anything specific?

  27. Deleted User<@439223656200273932> thanks, should I set the interval to anything specific?
    ShadowApr 11, 2025, 8:59 PM

    No, 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

  28. Deleted UserApr 11, 2025, 9:04 PM

    Done, with same settings (1 xp per day)

  29. 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 PM

    this member's xp today dropped from 242 to 235 for some reason, reducing their level too but they haven't lost their role reward

  30. Deleted UserApr 12, 2025, 8:21 PM

    should I just disable xp decay and leave it at that or do I keep it running for more testing?

  31. 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 PM

    now it's 231 😅

  32. Deleted UserApr 13, 2025, 8:19 PM

    dropped 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

  33. CodeizeApr 13, 2025, 8:37 PM

    We're looking into it on our end 🙏

  34. ShadowApr 13, 2025, 10:07 PM

    @Deleted User ~~Are you getting XP decay logs in your kiai logging channel for that user~~

  35. ShadowApr 13, 2025, 10:20 PM

    I think I may have found the issue!

  36. ShadowApr 13, 2025, 11:20 PM

    XP decay should be fully working now

  37. CodeizeApr 13, 2025, 11:25 PM

    Thanks 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 🙏

  38. 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