Fix bug when updating a scheduled events location #2349
Merged
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 Etiquette
Changes
Closes Issue: NaN
Description
There must have been some stealth changes on Discords part when updating a scheduled event, because in the current implementation we get an error for invalid form body when setting the location to a voice or stage channel if we do not provide null for the entity_metadata field. This was redundant before.
This PR also fixes a "bug" when changing the location to an external one without providing a new end time. It did not take into account that the event can already have an end time set even though it was a voice or stage channel event. This might've been a stealth change by Discord as well, because I don't remember it being possible to set the end time on voice or stage channel events. Now you can do that via the API, but not (yet?) via the UI.