diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 1350b9d91..8a89bff80 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -1299,8 +1299,7 @@ class Webhook(BaseWebhook): proxy_auth=self.proxy_auth, reason=reason, ) - - if prefer_auth and self.auth_token: + elif prefer_auth and self.auth_token: data = await adapter.edit_webhook( self.id, self.auth_token, diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py index 00fc33136..398342761 100644 --- a/discord/webhook/sync.py +++ b/discord/webhook/sync.py @@ -834,8 +834,7 @@ class SyncWebhook(BaseWebhook): payload['channel_id'] = channel.id data = adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason) - - if prefer_auth and self.auth_token: + elif prefer_auth and self.auth_token: data = adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason) elif self.token: data = adapter.edit_webhook_with_token(self.id, self.token, payload=payload, session=self.session, reason=reason)