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

Partial ScheduledEvent #9262

Open
Baviaan opened this issue Feb 25, 2023 · 3 comments
Open

Partial ScheduledEvent #9262

Baviaan opened this issue Feb 25, 2023 · 3 comments
Labels
feature request This is a feature request.

Comments

@Baviaan
Copy link

Baviaan commented Feb 25, 2023

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

@Baviaan Baviaan added the feature request This is a feature request. label Feb 25, 2023
@Puncher1
Copy link
Contributor

Puncher1 commented Feb 27, 2023

There's a method called Guild.get_scheduled_event.

This method doesn't make an API call: discord/guild.py#L925

@Baviaan
Copy link
Author

Baviaan commented Mar 1, 2023

But that returns None if you don't populate the cache first by making an API call.

@Rapptz
Copy link
Owner

Rapptz commented Mar 1, 2023

Cache is nearly never populated via API calls, they're populated via the gateway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request This is a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants