Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
NAFF 1.11.1
Browse files Browse the repository at this point in the history
NAFF 1.11.1
  • Loading branch information
LordOfPolls committed Sep 25, 2022
2 parents a4aa4fc + e68dabb commit 9b5d70b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion naff/client/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def __init__(

def __str__(self) -> str:
if self.errors:
errors = self.search_for_message(self.errors)
try:
errors = self.search_for_message(self.errors)
except (KeyError, ValueError, TypeError):
errors = [self.text]
out = f"HTTPException: {self.status}|{self.response.reason}: " + "\n".join(errors)
else:
out = f"HTTPException: {self.status}|{self.response.reason} || {self.text}"
Expand Down
2 changes: 2 additions & 0 deletions naff/models/naff/application_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,8 @@ def _compare_options(local_opt_list: dict, remote_opt_list: dict) -> bool:
"choices": ("choices", []),
"max_value": ("max_value", None),
"min_value": ("min_value", None),
"max_length": ("max_length", None),
"min_length": ("max_length", None),
}
post_process: Dict[str, Callable] = {
"choices": lambda l: [d | {"name_localizations": {}} if len(d) == 2 else d for d in l],
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "naff"
version = "1.11.0"
version = "1.11.1"
description = "Not another freaking fork"
authors = [
"LordOfPolls <[email protected]>",
Expand Down

0 comments on commit 9b5d70b

Please sign in to comment.