discord.py
discord.py copied to clipboard
Partial ScheduledEvent
Summary
A Partial ScheduledEvent similar to PartialMessage so that one can call the delete() method directly without first having to fetch the event.
What is the feature request for?
The core library
The Problem
I have a guild id and event id and I want to delete the event. Currently I need an API call to fetch the event first and then delete, when it should be possible to delete the event directly.
This will also be useful for the edit method if one simply wants to update the description for example.
The Ideal Solution
Similar to PartialMessage, it would be ideal if you can construct a PartialEvent from the guild id and event id to call delete on.
The Current Solution
Currently I first issue an API call to fetch the scheduled event and then another API call to delete the event.
Additional Context
No response
There's a method called Guild.get_scheduled_event.
This method doesn't make an API call: discord/guild.py#L925
But that returns None if you don't populate the cache first by making an API call.
Cache is nearly never populated via API calls, they're populated via the gateway.