- do not pin requests version to 2.32.0
set_timestamp()accepts also a string- add support for
flags
- CLI requires one webhook url
- fix editing and deleting messages with a
thread_id
- fix typing for allowed_mentions
- add support for threads
- set
thread_idorthread_nameas kwargs inAsyncDiscordWebhookandDiscordWebhook
- set
timeoutkeyword has accidentally setttsas well
set_timestamp()accepts also a datetime object- set timestamp as ISO 8601
- fix rate limit retry
- removed
remove_filesas an optional parameter in.execute()..filesare automatically cleared so that the files aren't uploaded twice when editing a webhook.
- fix removing embeds and files when editing a webhook
execute()stores the webhook ID in the.idpropertyDiscordWebhook.create_batch()creates multiple instances
DiscordWebhookandAsyncDiscordWebhookurlparameter only excepts one url asstredit()excepts no parametersdelete()excepts no parameters
DiscordEmbed- rename
del_embed_field()todelete_embed_field()
- rename
ColourNotInRangeExceptionwas renamed toColorNotInRangeException
- fix async file attachments
- only check if color is in range if color was set
- fix support for using a list of webhook URLs
- fix hex to int color conversion
- add async support
- enable
rate_limit_retryin webhookedit()function - add optional kwargs to
editfunction to specify fields that will be added or override existing fields in the webhook edit request. e.g. attachments
- add optional
rate_limit_retryto webhook. The webhook will automatically be sent once the rate limit has been lifted
- add
timeoutparam 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 clearembedsandfilesproperties of webhook object - add optional
remove_embedsandremove_filesargs toexecute()in order to automatically clearembedsandfilesproperties - add
remove_file()function in order to remove a file infilesgiven 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 toDiscordWebhookclass
- add
allowed_mentionsproperty 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
DiscordEmbedtodictbecauseDiscordEmbedis 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