mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-03-02 11:11:58 +01:00
Fix DiscordUtil#getOrCreateWebhook using webhooks without tokens
This commit is contained in:
parent
668c9634ca
commit
3f857e3183
@ -79,7 +79,7 @@ public final class DiscordUtil {
|
||||
final CompletableFuture<Webhook> future = new CompletableFuture<>();
|
||||
channel.retrieveWebhooks().queue(webhooks -> {
|
||||
for (final Webhook webhook : webhooks) {
|
||||
if (webhook.getName().equals(webhookName)) {
|
||||
if (webhook.getName().equals(webhookName) && webhook.getToken() != null) {
|
||||
ACTIVE_WEBHOOKS.addIfAbsent(webhook.getId());
|
||||
future.complete(webhook);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user