Fix webhook messages being parsed unnecessarily (#4346)

This wasted CPU time parsing responses from Discord that we will never use, plus caused problems when parsing webhooks that our library couldn't parse correctly (MinnDevelopment/discord-webhooks#36).
This commit is contained in:
Josh Roy 2021-07-11 15:36:46 -04:00 committed by GitHub
parent eed73e3157
commit 1556b911b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ public final class DiscordUtil {
*/
public static WebhookClient getWebhookClient(long id, String token, OkHttpClient client) {
return new WebhookClientBuilder(id, token)
.setWait(false)
.setAllowedMentions(AllowedMentions.none())
.setHttpClient(client)
.setDaemon(true)