Skip to content

Commit

Permalink
apply nit name suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Snipy7374 committed Sep 14, 2024
1 parent 297e71c commit 81c60ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions disnake/embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def set_footer(
"text": str(text),
}

result = self._handle_resource(icon_url, file, key="footer", strict=False)
result = self._handle_resource(icon_url, file, key="footer", required=False)
if result is not None:
self._footer["icon_url"] = result

Expand Down Expand Up @@ -650,7 +650,7 @@ def set_author(
self._author["url"] = str(url)

result = self._handle_resource(
icon_url if icon_url else None, file, key="author", strict=False
icon_url if icon_url else None, file, key="author", required=False
)
if result is not None:
self._author["icon_url"] = result
Expand Down Expand Up @@ -887,9 +887,9 @@ def get_default_colour(cls) -> Optional[Colour]:
get_default_color = get_default_colour

def _handle_resource(
self, url: Optional[Any], file: File, *, key: _FileKey, strict: bool = True
self, url: Optional[Any], file: File, *, key: _FileKey, required: bool = True
) -> Optional[str]:
if strict:
if required:
if not (url is MISSING) ^ (file is MISSING):
raise TypeError("Exactly one of url or file must be provided")
else:
Expand Down

0 comments on commit 81c60ec

Please sign in to comment.