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.
Rather than letting invites be typed as a mess of interfaces, the
Invite
class is actually typed as a class now. This class stores metadata properties asnull
in situations where metadata is not returned by the API, which is now reflected accurately. Additional types were added for specifying private invites and guild channel invites, both with and without the additional metadata.In situations where an invite is possibly a guild or private invite, its type can now be deduced via
invite.guild
being truthy, rather than having to use'guild' in invite
to check. This is a side effect of the way TS handles the distinction between omitted properties and properties withundefined
as a value.I'm unsure of a couple relevant API details; will leave comments asking about them.