mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-27 07:12:35 +02:00
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:
parent
eed73e3157
commit
1556b911b2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user