Skip to content

Commit

Permalink
fix(scheduled_events): location editing breaking (#1998)
Browse files Browse the repository at this point in the history
* fix(scheduled_events): location breaking

* chore(changelog): changelog
  • Loading branch information
Middledot committed Apr 3, 2023
1 parent 614f794 commit 4a5099a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
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 @@ async def edit(
payload["channel_id"] = location.value.id
payload["entity_metadata"] = None

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

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

0 comments on commit 4a5099a

Please sign in to comment.