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: ScheduledEvent.creator_id returning incorrect type #2162

Merged
merged 6 commits into from Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -153,6 +153,8 @@ These changes are available on the `master` branch, but have not yet been releas
([#2148](https://github.com/Pycord-Development/pycord/pull/2148))
- Fixed missing `delete_after` parameter in overload type-hinting for `send` method in
`Webhook` class. ([#2156](https://github.com/Pycord-Development/pycord/pull/2156))
- Fixed `ScheduledEvent.creator_id` returning `str` instead of `int`.
([#2162](https://github.com/Pycord-Development/pycord/pull/2162))

## [2.4.1] - 2023-03-20

Expand Down
4 changes: 2 additions & 2 deletions discord/scheduled_events.py
Expand Up @@ -158,7 +158,7 @@ class ScheduledEvent(Hashable):
The number of users that have marked themselves as interested in the event.
creator_id: Optional[:class:`int`]
The ID of the user who created the event.
It may be ``None`` because events created before October 25th, 2021, haven't
It may be ``None`` because events created before October 25th, 2021 haven't
had their creators tracked.
creator: Optional[:class:`User`]
The resolved user object of who created the event.
Expand Down Expand Up @@ -209,7 +209,7 @@ def __init__(
ScheduledEventStatus, data.get("status")
)
self.subscriber_count: int | None = data.get("user_count", None)
self.creator_id = data.get("creator_id", None)
self.creator_id: int | None = utils._get_as_snowflake(data, "creator_id")
self.creator: Member | None = creator

entity_metadata = data.get("entity_metadata")
Expand Down