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

Lines changed: 3 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy