You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does not fail in the constructor, but when trying to connect it passes the list to requests and that fails:
.\python\Scripts\discord_webhook.exe --url "https://discord.com/api/webhooks/*redacted*" -c "asdf"
Traceback (most recent call last):
File "*redacted*\python\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "*redacted*\python\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "*redacted*\python\Scripts\discord_webhook.exe\__main__.py", line 7, in <module>
File "*redacted*\python\lib\site-packages\discord_webhook\__main__.py", line 33, in main
return webhook.execute() is not None
File "*redacted*\python\lib\site-packages\discord_webhook\webhook.py", line 444, in execute
response = self.api_post_request()
File "*redacted*\python\lib\site-packages\discord_webhook\webhook.py", line 388, in api_post_request
return requests.post(
File "*redacted*\python\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "*redacted*\python\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "*redacted*\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "*redacted*\python\lib\site-packages\requests\sessions.py", line 697, in send
adapter = self.get_adapter(url=request.url)
File "*redacted*\python\lib\site-packages\requests\sessions.py", line 792, in get_adapter
raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for "['https://discord.com/api/webhooks/*redacted*']"
You can
drop CLI: if nobody noticed that it doesn't work, is it even useful?
only allow one --url: it's very simple to do and probably enough for a minimal CLI
rewrite CLI and use provided urls sequentially: is simple, but requires some work
rewrite CLI and use provided urls sequentially, but send in parallel if discord_webhook[async] is installed: it's probably overkill
The text was updated successfully, but these errors were encountered:
The
--url
argument allows multiple values ('+'), soargs.url
is actually a list of strings (even when given only one--url
):python-discord-webhook/discord_webhook/__main__.py
Line 28 in 64e5fd5
But the DiscordWebhook accepts only one str url in the constuctor
python-discord-webhook/discord_webhook/webhook.py
Line 240 in 64e5fd5
It does not fail in the constructor, but when trying to connect it passes the list to
requests
and that fails:You can
The text was updated successfully, but these errors were encountered: