feat/fix💥: adjust and fix various issues with scheduled events #1547
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Description
This PR improves using scheduled events in the library by fixing longstanding issues related to it and its events. In particular, this adds a proper method for fetching scheduled events in the cache, adds a get event for scheduled events for guilds, and fixes
GuildScheduledEventUserAdd/Remove
since those were utterly broken.Note: this technically is breaking, and so should have some eyes on it. However,
GuildScheduledEventUserAdd/Remove
is so broken and unusable in its current state to the point where you would have to use a raw event to get any useful information most of the time. I understand that violates our versioning standards, but I legitimately think this is such an extreme case that it should be considered.Changes
GuildScheduledEventUserAdd/Remove
by properly passing the IDs instead of the objects of the events.with_user_count
.fetch_scheduled_event
toSmartCache
.Guild
variant now uses the above method, using the cache properly.get_scheduled_event
toGuild
.user_count
inScheduledEvent
.Related Issues
Test Scenarios
Python Compatibility
3.10.x
3.11.x
Checklist
pre-commit
code linter over all edited files