Fix bug when app commands would not have a module attribute set on copy

This commit is contained in:
Rapptz 2022-03-12 20:55:08 -05:00
parent d63fd578c2
commit 42beec9fa9

View File

@ -401,6 +401,7 @@ class Command(Generic[GroupT, P, T]):
copy.parent = self.parent
copy.on_error = self.on_error
copy._params = self._params.copy()
copy.module = self.module
copy.binding = binding
return copy
@ -774,6 +775,7 @@ class Group:
copy._guild_ids = self._guild_ids
copy.description = self.description
copy.parent = self.parent
copy.module = self.module
copy._attr = self._attr
copy._children = {child.name: child._copy_with_binding(binding) for child in self._children.values()}
return copy