JDA
JDA copied to clipboard
Update Invite to match Discord changes
Pull Request Etiquette
- [x] I have checked the PRs for upcoming features/bug fixes.
- [x] I have read the contributing guidelines.
Changes
- [x] Internal code
- [x] Library interface (affecting end-user code)
- [x] Documentation
- [ ] Other: _____
Closes Issue: NaN
Description
Discord made all the previous expanded Invite properties (max_uses, temporary, creation, etc...) except for uses accessible without authentication, so remove the expanded property and deprecate usages
Additionally, update docs to remove the outdated notice that certain fields require expansion
Adds a new method getTimeExpires to return the expires_at
field of an invite, which is null if the invite never expires
Add the FRIEND
InviteType and a way to parse it
Change EntityBuilder
to use the type id to determine invite type
Could you please link the appropriate Discord API docs PR/commit that documents this change?
Could you please link the appropriate Discord API docs PR/commit that documents this change?
There doesn't seem to be any docs changes, noticed the changes after exceptions were thrown when trying to resolve guild invites
Probably should have opened a GH Issue but thought it was redundant
Looks like there is still a compilation issue here with the constructor usage. Have you tested whether the usage of with_expiration=true
makes a difference? It doesn't seem like we use it at all, currently.
Looks like there is still a compilation issue here with the constructor usage. Have you tested whether the usage of
with_expiration=true
makes a difference? It doesn't seem like we use it at all, currently.
from what I recall the with_expiration
query makes no difference on the response body whether or not it its true or false
Should compile now, missed an internal usage
Gonna hold off on merging this, still waiting for some info regarding the API stability here.
I've been told that the changes to expanding invites will need to be reverted. The API will not continue to return the expanded object on the resolve endpoint in the future.
I've been told that the changes to expanding invites will need to be reverted. The API will not continue to return the expanded object on the resolve endpoint in the future.
Seems like Discord. I'll check after they revert the changes and see if there's anything left.
Change to max_age field noted here: https://github.com/discord/discord-api-docs/pull/6233
I've gone ahead and converted this PR into a draft, until it has been adjusted. If you don't want to continue working on it, feel free to close it and open an issue instead.