- fix typing for allowed_mentions
- add support for threads
- set
thread_id
orthread_name
as kwargs inAsyncDiscordWebhook
andDiscordWebhook
- set
timeout
keyword has accidentally settts
as well
set_timestamp()
accepts also a datetime object- set timestamp as ISO 8601
- fix rate limit retry
- removed
remove_files
as an optional parameter in.execute()
..files
are 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.id
propertyDiscordWebhook.create_batch()
creates multiple instances
DiscordWebhook
andAsyncDiscordWebhook
url
parameter only excepts one url asstr
edit()
excepts no parametersdelete()
excepts no parameters
DiscordEmbed
- rename
del_embed_field()
todelete_embed_field()
- rename
ColourNotInRangeException
was 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_retry
in webhookedit()
function - add optional kwargs to
edit
function to specify fields that will be added or override existing fields in the webhook edit request. e.g. attachments
- 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