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(guild): don't cache emojis/stickers/scheduled events if intent is disabled #1083

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

shiftinv
Copy link
Member

Summary

Discord sends some fields in GUILD_CREATEs that are otherwise gated by intents, previously resulting in the library caching (and never updating) emojis, stickers, and scheduled_events even with the intent disabled.

This PR fixes the caching behavior to only cache them if the corresponding intent is enabled. It shouldn't affect non-gw guilds like those from fetch_guild etc., which continue to populate the emoji/sticker attributes.

No documentation changes since it didn't seem necessary, but can be added if there's demand for it.

This was brought up here: https://canary.discord.com/channels/808030843078836254/942319505915412500/1130943549937029170

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running pdm lint
    • I have type-checked the code by running pdm pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@shiftinv shiftinv added s: needs review Issue/PR is awaiting reviews t: bugfix labels Jul 19, 2023
@shiftinv shiftinv added the 3.0 label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 s: needs review Issue/PR is awaiting reviews t: bugfix
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant