Skip to content
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

fix(GuildEmoji): Cache restricted roles and author data #6675

Merged
merged 2 commits into from Sep 26, 2021

Conversation

Jiralite
Copy link
Member

Please describe the changes this PR makes and why it should be merged:
Guild emojis that were restricted to roles were not being stored in discord.js over the gateway - an empty array would always be set. As such, methods like GuildEmojiRoleManager.add() would completely wipe all other roles from the emoji (since it calls .set() from the cache which is empty), and then only add what you specified, which is bad behaviour and not intended.

I believe I managed to fix this by setting the default value to the provided array. I have tested this and it works as expected.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@Jiralite Jiralite changed the title fix(GuildEmoji): Cache restricted roles fix(GuildEmoji): Cache restricted roles and author data Sep 23, 2021
@iCrawl iCrawl merged commit 60b8ba6 into discordjs:main Sep 26, 2021
@Jiralite Jiralite deleted the guild-emoji-role-cache branch September 26, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants