-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roles cache not setting to memory properly when it's stored outside memory but not in memory #13
Comments
Does this still happen? |
client.cache.roles.get(963115006659026944n, 669893888856817665n)
> {
> name: 'Role Name',
> guildId: 669893888856817665n,
> color: 0,
> toggles: RoleToggles { bitfield: 1 },
> id: 963115006659026944n,
> permissions: 1071698255360n
> }
client.cache.roles.memory.get(963115006659026944n)
> undefined If it does please tell how to reproduce |
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 The code itself should be clear about the issue but if you want reproducible steps:
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: