From c5a94f2d2cf667ec2479d23f9481a872a2bfbc4e Mon Sep 17 00:00:00 2001 From: Soheab <33902984+Soheab@users.noreply.github.com> Date: Sat, 21 Mar 2026 22:04:32 +0100 Subject: [PATCH] Improve error from Webhook.from_url --- discord/webhook/async_.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 5768c7200..2ef0102c8 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -1322,6 +1322,9 @@ class Webhook(BaseWebhook): state = None if client is not MISSING: + if client._ready is MISSING: + raise ValueError('Client must be logged in to use from_url with a client.') + state = client._connection if session is MISSING: session = client.http._HTTPClient__session # type: ignore