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

Commit

Permalink
fix: fix minor flaws in appCmd sync detection (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
LordOfPolls authored Oct 31, 2022
1 parent 3d84dfc commit 0f50830
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion naff/models/naff/application_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,9 @@ def _compare_commands(local_cmd: dict, remote_cmd: dict) -> bool:
"name_localized": ("name_localizations", None),
"description_localized": ("description_localizations", None),
}
if remote_cmd.get("guild_id"):
# non-global command
del lookup["dm_permission"]

for local_name, comparison_data in lookup.items():
remote_name, default_value = comparison_data
Expand All @@ -1125,7 +1128,7 @@ def _compare_options(local_opt_list: dict, remote_opt_list: dict) -> bool:
"max_value": ("max_value", None),
"min_value": ("min_value", None),
"max_length": ("max_length", None),
"min_length": ("max_length", None),
"min_length": ("min_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

0 comments on commit 0f50830

Please sign in to comment.