-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add API version configuration #601
Conversation
This is a first draft of the configuration options I mentioned here. Would be nice to get some feedback on this. Are there more things that could be configured in this way? |
If there are no concerns about the design of this (mutable properties in an object), I would say this is ready for review. |
Looks fine 👍 |
This PR removed the separately listed Gateway version, should we also only have one property for this? |
I thought about this and we probably shouldn't - if you want to change the version for only one of them you should be free to do so. |
Do you mean to have a fixed set of versions? |
I meant always using the same version for gateway and rest, but I think we should allow changing them independently. |
Yeah it looks fine; we just need to fix the conflicts to go |
Will do |
Done |
This PR allows to configure which versions of Discord's APIs Kord uses.
This is achieved by changing the properties
REST_VERSION
,GATEWAY_VERSION
orVOICE_GATEWAY_VERSION
of theKordConfiguration
object:Reading the REST version from the environment variable
dev.kord.rest.version
is removed.DefaultGateway.Companion.invoke
now no longer uses an unversioned gateway url.