Skip to content

Commit d9a8a42

Browse files
JustaSqu1dDorukyumLulalaby
authored
fix: ScheduledEvent.creator_id returning incorrect type (#2162)
Signed-off-by: JustaSqu1d <[email protected]> Signed-off-by: Dorukyum <[email protected]> Co-authored-by: Dorukyum <[email protected]> Co-authored-by: Lala Sabathil <[email protected]>
1 parent 20598d4 commit d9a8a42

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ These changes are available on the `master` branch, but have not yet been releas
153153
([#2148](https://github.com/Pycord-Development/pycord/pull/2148))
154154
- Fixed missing `delete_after` parameter in overload type-hinting for `send` method in
155155
`Webhook` class. ([#2156](https://github.com/Pycord-Development/pycord/pull/2156))
156+
- Fixed `ScheduledEvent.creator_id` returning `str` instead of `int`.
157+
([#2162](https://github.com/Pycord-Development/pycord/pull/2162))
156158

157159
## [2.4.1] - 2023-03-20
158160

discord/scheduled_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class ScheduledEvent(Hashable):
158158
The number of users that have marked themselves as interested in the event.
159159
creator_id: Optional[:class:`int`]
160160
The ID of the user who created the event.
161-
It may be ``None`` because events created before October 25th, 2021, haven't
161+
It may be ``None`` because events created before October 25th, 2021 haven't
162162
had their creators tracked.
163163
creator: Optional[:class:`User`]
164164
The resolved user object of who created the event.
@@ -209,7 +209,7 @@ def __init__(
209209
ScheduledEventStatus, data.get("status")
210210
)
211211
self.subscriber_count: int | None = data.get("user_count", None)
212-
self.creator_id = data.get("creator_id", None)
212+
self.creator_id: int | None = utils._get_as_snowflake(data, "creator_id")
213213
self.creator: Member | None = creator
214214

215215
entity_metadata = data.get("entity_metadata")

0 commit comments

Comments
 (0)