Closed duncte123 closed 4 years ago
Can someone review this asap? It has all sorts of weird behavior because it gets redirected to discord.com
Temp fix is to add an interceptor for now
private val oAuth2Client = OAuth2Client.Builder()
.setClientId(config.discord.oauth.clientId)
.setClientSecret(config.discord.oauth.clientSecret)
.setOkHttpClient(
OkHttpClient.Builder()
.addInterceptor {
var request = it.request()
val httpUrl = request.url()
if (httpUrl.host().contains("discordapp")){
val newHttpUrl = httpUrl.newBuilder()
.host("discord.com")
.build()
request = request.newBuilder()
.url(newHttpUrl)
.build()
}
it.proceed(request)
}
.build()
)
.build()
Pull Request
Pull Request Checklist
Please follow the following steps before opening this PR.
PRs that do not complete the checklist will be subject to denial for missing information.
Pull Request Information
Check and fill in the blanks for all that apply:
______
module of the JDA-Utilities library.______
.Description
Discord recently changed their domain from discordapp.com to discord.com (the cdn is still on discordapp.com) meaning that the domains used need to be updated