Skip to content

Commit

Permalink
Change avatar_url type hint to Any instead of str
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapptz committed Aug 27, 2021
1 parent 516675d commit 29b808d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 7 additions & 6 deletions discord/webhook/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -1206,7 +1206,7 @@ async def send(
content: str = MISSING,
*,
username: str = MISSING,
avatar_url: str = MISSING,
avatar_url: Any = MISSING,
tts: bool = MISSING,
ephemeral: bool = MISSING,
file: File = MISSING,
Expand All @@ -1226,7 +1226,7 @@ async def send(
content: str = MISSING,
*,
username: str = MISSING,
avatar_url: str = MISSING,
avatar_url: Any = MISSING,
tts: bool = MISSING,
ephemeral: bool = MISSING,
file: File = MISSING,
Expand All @@ -1245,7 +1245,7 @@ async def send(
content: str = MISSING,
*,
username: str = MISSING,
avatar_url: str = MISSING,
avatar_url: Any = MISSING,
tts: bool = False,
ephemeral: bool = False,
file: File = MISSING,
Expand Down Expand Up @@ -1282,9 +1282,10 @@ async def send(
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`
Expand Down
11 changes: 6 additions & 5 deletions discord/webhook/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ def send(
content: str = MISSING,
*,
username: str = MISSING,
avatar_url: str = MISSING,
avatar_url: Any = MISSING,
tts: bool = MISSING,
file: File = MISSING,
files: List[File] = MISSING,
Expand All @@ -787,7 +787,7 @@ def send(
content: str = MISSING,
*,
username: str = MISSING,
avatar_url: str = MISSING,
avatar_url: Any = MISSING,
tts: bool = MISSING,
file: File = MISSING,
files: List[File] = MISSING,
Expand All @@ -803,7 +803,7 @@ def send(
content: str = MISSING,
*,
username: str = MISSING,
avatar_url: str = MISSING,
avatar_url: Any = MISSING,
tts: bool = False,
file: File = MISSING,
files: List[File] = MISSING,
Expand Down Expand Up @@ -835,9 +835,10 @@ def send(
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`
Expand Down

0 comments on commit 29b808d

Please sign in to comment.