aboutsummaryrefslogtreecommitdiff
path: root/discord/webhook
diff options
context:
space:
mode:
authorRapptz <[email protected]>2021-08-27 05:40:50 -0400
committerRapptz <[email protected]>2021-08-27 05:41:00 -0400
commit29b808d33f02aa1519703f58823de091dc2fe370 (patch)
tree109bc9c07813050e98b9d12041e9c3bf8afe83b7 /discord/webhook
parentFix a typo in member_role_update (diff)
downloaddiscord.py-29b808d33f02aa1519703f58823de091dc2fe370.tar.xz
discord.py-29b808d33f02aa1519703f58823de091dc2fe370.zip
Change avatar_url type hint to Any instead of str
Diffstat (limited to 'discord/webhook')
-rw-r--r--discord/webhook/async_.py13
-rw-r--r--discord/webhook/sync.py11
2 files changed, 13 insertions, 11 deletions
diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py
index 3ae23db1..d1ed1ade 100644
--- a/discord/webhook/async_.py
+++ b/discord/webhook/async_.py
@@ -425,7 +425,7 @@ def handle_message_parameters(
content: Optional[str] = MISSING,
*,
username: str = MISSING,
- avatar_url: str = MISSING,
+ avatar_url: Any = MISSING,
tts: bool = False,
ephemeral: bool = False,
file: File = MISSING,
@@ -1206,7 +1206,7 @@ class Webhook(BaseWebhook):
content: str = MISSING,
*,
username: str = MISSING,
- avatar_url: str = MISSING,
+ avatar_url: Any = MISSING,
tts: bool = MISSING,
ephemeral: bool = MISSING,
file: File = MISSING,
@@ -1226,7 +1226,7 @@ class Webhook(BaseWebhook):
content: str = MISSING,
*,
username: str = MISSING,
- avatar_url: str = MISSING,
+ avatar_url: Any = MISSING,
tts: bool = MISSING,
ephemeral: bool = MISSING,
file: File = MISSING,
@@ -1245,7 +1245,7 @@ class Webhook(BaseWebhook):
content: str = MISSING,
*,
username: str = MISSING,
- avatar_url: str = MISSING,
+ avatar_url: Any = MISSING,
tts: bool = False,
ephemeral: bool = False,
file: File = MISSING,
@@ -1282,9 +1282,10 @@ class Webhook(BaseWebhook):
username: :class:`str`
The username to send with this message. If no username is provided
then the default username for the webhook is used.
- avatar_url: Union[:class:`str`, :class:`Asset`]
+ avatar_url: :class:`str`
The avatar URL to send with this message. If no avatar URL is provided
- then the default avatar for the webhook is used.
+ then the default avatar for the webhook is used. If this is not a
+ string then it is explicitly cast using ``str``.
tts: :class:`bool`
Indicates if the message should be sent using text-to-speech.
ephemeral: :class:`bool`
diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py
index d358fd5f..5c85a036 100644
--- a/discord/webhook/sync.py
+++ b/discord/webhook/sync.py
@@ -770,7 +770,7 @@ class SyncWebhook(BaseWebhook):
content: str = MISSING,
*,
username: str = MISSING,
- avatar_url: str = MISSING,
+ avatar_url: Any = MISSING,
tts: bool = MISSING,
file: File = MISSING,
files: List[File] = MISSING,
@@ -787,7 +787,7 @@ class SyncWebhook(BaseWebhook):
content: str = MISSING,
*,
username: str = MISSING,
- avatar_url: str = MISSING,
+ avatar_url: Any = MISSING,
tts: bool = MISSING,
file: File = MISSING,
files: List[File] = MISSING,
@@ -803,7 +803,7 @@ class SyncWebhook(BaseWebhook):
content: str = MISSING,
*,
username: str = MISSING,
- avatar_url: str = MISSING,
+ avatar_url: Any = MISSING,
tts: bool = False,
file: File = MISSING,
files: List[File] = MISSING,
@@ -835,9 +835,10 @@ class SyncWebhook(BaseWebhook):
username: :class:`str`
The username to send with this message. If no username is provided
then the default username for the webhook is used.
- avatar_url: Union[:class:`str`, :class:`Asset`]
+ avatar_url: :class:`str`
The avatar URL to send with this message. If no avatar URL is provided
- then the default avatar for the webhook is used.
+ then the default avatar for the webhook is used. If this is not a
+ string then it is explicitly cast using ``str``.
tts: :class:`bool`
Indicates if the message should be sent using text-to-speech.
file: :class:`File`