- add optional
rate_limit_retry
to webhook. The webhook will automatically be sent once the rate limit has been lifted
- add
timeout
param to webhooks
- convert embed color to decimal if it's given as hex
- return webhook responses only as a list if multiple urls are given. Otherwise, just return the response object
- add
remove_embeds()
,remove_files()
functions in order to clearembeds
andfiles
properties of webhook object - add optional
remove_embeds
andremove_files
args toexecute()
in order to automatically clearembeds
andfiles
properties - add
remove_file()
function in order to remove a file infiles
given by filename
- return webhook responses only as a list if multiple urls are given. Otherwise, just return the response object
- webhook responses are always returned as a list
edit()
anddelete()
methods are now supporting multiple webhooks
- fixed an issue where multiple webhook urls would throw an error after
.execute()
has been called
- add
edit()
anddelete()
methods toDiscordWebhook
class
- add
allowed_mentions
property to webhooks. see Discord Docs
- add
set_content()
function
- fixed an issue where the default timestamp was not updated
- add an entry point for a minimal cli
- send webhook to multiple urls if urls are provided as
list
.execute()
now returns the webhook response
- convert
DiscordEmbed
todict
becauseDiscordEmbed
is not JSON serializable
- import from package instead of submodule
- send files and message/embed simultaneously
If you have to use a proxy, you can now add your proxies with the proxies
parameter
from discord_webhook.webhook import DiscordWebhook
proxies = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
DiscordWebhook(url="webhook URL", proxies=proxies)
or with the set_proxies()
function
from discord_webhook.webhook import DiscordWebhook
proxies = {
'http': 'http://10.10.1.10:3128',
'https': 'http://10.10.1.10:1080',
}
webhook = DiscordWebhook(url="webhook URL")
webhook.set_proxies(proxies)
- send webhook with files
- send basic webhook
- send webhook with embedded content