Kiai keeps adding back the first level award

Hello again. I run a historical collecting community as aforementioned in my prior support post and the issue this time arises whenever a user unlocks a new level award. For some reason, Kiai continues adding back the first award role even though I have turned off the role stacking function. An image is added for context. (Private is being added back despite the user "promoting" to SFC). This is happening with every single user in the community. Not sure exactly why this is occuring and this time I am sure it's not another bot's leveling system clashing with Kiai's. Recovering from COVID so if what I just posted made literally no sense then please ask for context and anything else you require. Thanks for the support and a great bot.
No description
39 Replies
Shadow
Shadow2mo ago
Is it adding it back or is it never removing it in the first place @Elluvon Also, are people getting other roles alongside the regular one, or just Private
Elluvon
ElluvonOP2mo ago
Adding back, because as a test I removed the role and then it re-added it lol Just their actual level award + the initial role (private)
Shadow
Shadow2mo ago
thats interesting what's your server's ID? (listed on /ping)
Elluvon
ElluvonOP2mo ago
1070840101887815710 User ID of affected member: 694336941998473216
Shadow
Shadow2mo ago
is private for level 1
Elluvon
ElluvonOP2mo ago
Yes
Elluvon
ElluvonOP2mo ago
Even weirder, just found a user with three
No description
Elluvon
ElluvonOP2mo ago
No description
Shadow
Shadow2mo ago
@Elluvon Just pushed out a change that should fix this, can you run /rewards sync and see if it fixes it
Elluvon
ElluvonOP2mo ago
Sure, should it update automatically?
Shadow
Shadow2mo ago
in theory everyone should get their highest role and nothing more
Elluvon
ElluvonOP2mo ago
Application did not respond
Shadow
Shadow2mo ago
it was still rebooting
Elluvon
ElluvonOP2mo ago
Ah It solved some of the members but not all of them
Shadow
Shadow2mo ago
it looks like its still going through them
Elluvon
ElluvonOP2mo ago
Gotcha, nevermind then lol Alright well that fixed the problem but now I have yet another issue lol
Shadow
Shadow2mo ago
would it happen to be that people aren't getting reward roles :iara_lurk_peek:
Elluvon
ElluvonOP2mo ago
No I added another award for level 1 and now I can't remove the role from the system, it just goes into an internal server error and won't remove the award, and then when I try to do so it via the role ID it will tell me the award doesn't exist even though it shows up in the reward list
Shadow
Shadow2mo ago
yeah the error in the logs is that it doesnt exist hmmmmmm
Elluvon
ElluvonOP2mo ago
It might be my fault a little bit for trying to cheat the system, I was trying to find a way to autorole everyone by giving a reward for level 1 and then having Kiai retroactively award it to everyone When I tried to retroactively award it went into an internal server error
Elluvon
ElluvonOP2mo ago
I mean I personally didn't see a reason why that wouldn't work
Shadow
Shadow2mo ago
yeah i dont either thats actually kinda big brain lol
Elluvon
ElluvonOP2mo ago
Considering from a coding perspective I assume the bot is just doing the same thing it would normally do
Shadow
Shadow2mo ago
@Elluvon see if its in the list now
Elluvon
ElluvonOP2mo ago
Fixed
Shadow
Shadow2mo ago
i disabled our cache entirely lol somethings up with it
Elluvon
ElluvonOP2mo ago
Wack Thanks much Do I need to run this every time I notice the problem? Because it's still happening I'd rather have a command that fixes the problem long-term instead of needing to re-run it every few days
Shadow
Shadow2mo ago
no if you're seeing it still there's a deeper bug than just the cache. the rewards sync is just a stopgap to force kiai to recheck every single one
Elluvon
ElluvonOP2mo ago
Yeah it's still occuring
Shadow
Shadow2mo ago
do you have a user ID that currently has too many reward roles @Elluvon
Elluvon
ElluvonOP2mo ago
Same user as before I think 694336941998473216 Unless I'm missing something and the role sync didn't catch his roles
Shadow
Shadow2mo ago
@Kiai eval "--async" const guild = this.client.guilds.resolve("1070840101887815710") const member = guild.members.resolve("694336941998473216") const rewards = await kiai.leveling.getAllRoleRewards(guild.id) const correctReward = rewards.find(x => x.roleId === "1107711410814861372") return kiai.functions.getRewardRolesToRemove(member.roles.cache.map(x => x.id), correctReward, rewards)
Kiai
Kiai2mo ago
[ '1107711366002921572' ]
[ '1107711366002921572' ]
Type:
Promise<Array<string>>
Promise<Array<string>>
⏱ 11.35ms<302.04μs>
Shadow
Shadow2mo ago
its seeing that it should remove the role, thats odd @Elluvon can you go to your server's audit logs and see if kiai is removing it and adding it or if it was never removed i cant reproduce this on my test instance and it looks like it has the role to remove here
Elluvon
ElluvonOP2mo ago
Yeah one second Hmm, I guess it was never removed by Kiai to begin with Even though I ran sync twice
Shadow
Shadow2mo ago
that makes sense actually, i think somehow a cached value was saved so that your server was stacking role rewards still, so hopefully now that ive disabled that we should see things working. can you ping me if you see it again though?
Elluvon
ElluvonOP2mo ago
Sure, will do
Shadow
Shadow2mo ago
tyty
Want results from more Discord servers?
Add your server