Skip to content

feat: add RateLimited gateway event #1334

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

almeidx
Copy link
Member

@almeidx almeidx commented Aug 15, 2025

Please describe the changes this PR makes and why it should be merged:

If applicable, please reference Discord API Docs PRs or commits that influenced this PR:

@almeidx almeidx requested review from a team as code owners August 15, 2025 00:51
Copy link

vercel bot commented Aug 15, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
discord-api-types Ready Ready Preview Comment Aug 17, 2025 1:10pm

Jiralite
Jiralite previously approved these changes Aug 15, 2025
Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plus Jiras request

/**
* @see {@link https://discord.com/developers/docs/events/gateway-events#rate-limited}
*/
export type GatewayRateLimitedDispatch<
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a union of concretes, not require users to pass in the op code they want imo. That said, how you'd present this is...gonna be fun

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it as close as docs as possible.
Additionally, the type parameter has a default (all the valid opcodes, which is only one anyways), if that's your concern

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still export aliased types for speed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants