You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In https://github.com/discordeno/cache-proxy/blob/main/index.ts#L461, it's setting to bot.cache.roles.memory.set while if you have options.cacheInMemory.guilds set to true, the role must be set into the respective guild's role collection and not in the general one bot.cache.roles.memory.
The text was updated successfully, but these errors were encountered:
It should still happen, yes. The line I linked to is changed (cuz of the recent code changes) but it's this, setting straight into bot.cache.roles.memory even when it could be a guild role.
The code itself should be clear about the issue but if you want reproducible steps:
Have cacheInMemory.guilds enabled
Have both in memory cache and outside memory cache
Keep both of these synced
Delete one role from a guild (from memory but not from the cache outside memory)
Now do bot.cache.roles.get(id)
You'll see that there's one role set into bot.cache.roles.memory instead of setting it in that guild
Here's the fix I have in my fork: https://github.com/AwesomeStickz/dd-cache-proxy/blob/main/index.ts#L262, I didn't add that here because it's "a bit" inefficient because it'll be setting the role to the correct place (expected) and also be setting to the cache outside memory (this part is useless but idm in my fork, but maybe in here you'd want the best way so I just created it as an issue instead)
In https://github.com/discordeno/cache-proxy/blob/main/index.ts#L461, it's setting to
bot.cache.roles.memory.set
while if you haveoptions.cacheInMemory.guilds
set to true, the role must be set into the respective guild's role collection and not in the general onebot.cache.roles.memory
.The text was updated successfully, but these errors were encountered: