mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-07 17:39:03 +00:00
Improve error from Webhook.from_url when passing client
This commit is contained in:
1 parent
bd2231bc99
commit
f7868eaf23
1 file changed
+3
@@ -1322,6 +1322,9 @@ class Webhook(BaseWebhook):
|
|||||||
|
|
||||||
state = None
|
state = None
|
||||||
if client is not MISSING:
|
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
|
state = client._connection
|
||||||
if session is MISSING:
|
if session is MISSING:
|
||||||
session = client.http._HTTPClient__session # type: ignore
|
session = client.http._HTTPClient__session # type: ignore
|
||||||
|
|||||||
Reference in new issue
Block a user