python-discord-webhook icon indicating copy to clipboard operation
python-discord-webhook copied to clipboard

[FEATURE REQUEST] A few different proxy additions.

Open GenerelSchwerz opened this issue 3 years ago • 1 comments

  1. If a webhook returns an error such as a 429 error, there should be a way to iterate through the supplied dict of proxies.

  2. As far as I'm aware, setting the proxies for a webhook object does not persist through a While or For-loop if it is nested. As such, proxies (to my albeit mediocre coding skills) can't be changed per n messages sent.

  3. The proxies used by the webhook should be an attribute of the webhook so debugging for proxy usage is easier.

GenerelSchwerz avatar Dec 10 '20 16:12 GenerelSchwerz

  1. Could you iterate through the webhook.proxies attribute of a given webhook that you call .execute() on?

  2. The workaround is a little hacky, but you could modify the .proxies attribute of the webhook object in the for/while loop, given that the webhook object persists, a.k.a. initializing it before entering the loop.

  3. As for you third point, the proxies are available with webhook.proxies, that's where the DiscordWebhook class stores them the proxies to use, until and after executed.

Does this help? And if not, do you have any subsequent questions?

GrandMoff100 avatar Mar 13 '22 21:03 GrandMoff100