chore: add discord-api-types as a community resource #2401
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.
discord-api-types is a TypeScript/JavaScript (enums work in JS, and types can be used in JSDocs via
@type {import('discord-api-types/v8).APIUser}
as an example) module I created that keeps an up-to-date* representation of Discord's current API, that users can use either in library making, or casually if they ever need to do raw API calls. We are keeping this module up to date, and versioning it by the API version provided by Discord.The main message might need some improvement, so please suggest if you have any! 😅
(also, are the names.. Discord names, GitHub names? Which one is it 👀 )
*: Per our readme, we only document types that have received some form of greenlight to be used, so it may be outdated at times
In the future, we might look into a way to turn the TS types into accurate typings in different languages (say, C#, Rust, Go, etc), which users can then use, should they choose to