Skip to content

Commit 1abdf03

Browse files
authored
fix: Deprecation of default_permission in Application Command (#1762)
1 parent 06df222 commit 1abdf03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

interactions/client/utils/deserialise_app_cmds.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def deserialize_app_cmds(data: list[dict]) -> list["InteractionCommand"]:
4141
cmd_dict["scopes"] = [cmd_dict.pop("guild_id", const.GLOBAL_SCOPE)]
4242

4343
del cmd_dict["version"]
44-
del cmd_dict["default_permission"]
44+
if hasattr(cmd_dict, "default_permission"):
45+
del cmd_dict["default_permission"]
46+
4547
cmd = command_mapping[cmd_type](**cmd_dict) # type: ignore
4648

4749
if options:

0 commit comments

Comments
 (0)