Skip to content

Commit

Permalink
Update core.py
Browse files Browse the repository at this point in the history
Signed-off-by: plun1331 <plun1331@gmail.com>
  • Loading branch information
plun1331 committed Mar 24, 2024
1 parent 956e632 commit 8bd4e8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord/commands/core.py
Expand Up @@ -950,7 +950,7 @@ def to_dict(self) -> dict:
self.default_member_permissions.value
)

if not self.guild_ids:
if not self.guild_ids and not self.is_subcommand:
as_dict["integration_types"] = [it.value for it in self.integration_types]
as_dict["contexts"] = [ctx.value for ctx in self.contexts]

Expand Down Expand Up @@ -1347,7 +1347,7 @@ def to_dict(self) -> dict:
self.default_member_permissions.value
)

if not self.guild_ids:
if not self.guild_ids and self.parent is None:
as_dict["integration_types"] = [it.value for it in self.integration_types]
as_dict["contexts"] = [ctx.value for ctx in self.contexts]

Expand Down

0 comments on commit 8bd4e8f

Please sign in to comment.