Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix app command copies #678

Merged
merged 10 commits into from
Aug 25, 2022
1 change: 1 addition & 0 deletions changelog/678.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make the :func:`.ext.commands.default_member_permissions` decorator always work in cogs.
2 changes: 2 additions & 0 deletions disnake/ext/commands/base_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def _ensure_assignment_on_copy(self, other: AppCommandT) -> AppCommandT:
if self._max_concurrency != other._max_concurrency:
# _max_concurrency won't be None at this point
other._max_concurrency = cast(MaxConcurrency, self._max_concurrency).copy()
if self.body._default_member_permissions != other.body._default_member_permissions:
EQUENOS marked this conversation as resolved.
Show resolved Hide resolved
other.body._default_member_permissions = self.body._default_member_permissions

try:
other.on_error = self.on_error
Expand Down