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(scheduled_events): location editing breaking #1998

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ These changes are available on the `master` branch, but have not yet been releas
- Fixed `AttributeError` caused by
[#1957](https://github.com/Pycord-Development/pycord/pull/1957) when using listeners
in cogs. ([#1989](https://github.com/Pycord-Development/pycord/pull/1989))
- Fixed scheduled events breaking when changing the location from external to a channel.
([#1998](https://github.com/Pycord-Development/pycord/pull/1998))

## [2.4.1] - 2023-03-20

Expand Down
2 changes: 2 additions & 0 deletions discord/scheduled_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@
payload["channel_id"] = location.value.id
payload["entity_metadata"] = None

payload["entity_type"] = location.type.value

Check warning on line 362 in discord/scheduled_events.py

View check run for this annotation

Codecov / codecov/patch

discord/scheduled_events.py#L362

Added line #L362 was not covered by tests

location = location if location is not MISSING else self.location
if end_time is MISSING and location.type is ScheduledEventLocationType.external:
end_time = self.end_time
Expand Down