[commands] Fix attribute access in cogs to commands.
Previously they were outdated copies, this updates the copies to the ones that are actually injected.
This commit is contained in:
parent
04ee10adc4
commit
1a0b1dfd29
@ -135,6 +135,10 @@ class Cog(metaclass=CogMeta):
|
|||||||
|
|
||||||
# Either update the command with the cog provided defaults or copy it.
|
# Either update the command with the cog provided defaults or copy it.
|
||||||
self.__cog_commands__ = tuple(c._update_copy(cmd_attrs) for c in cls.__cog_commands__)
|
self.__cog_commands__ = tuple(c._update_copy(cmd_attrs) for c in cls.__cog_commands__)
|
||||||
|
|
||||||
|
# Update the Command instances dynamically as well
|
||||||
|
for command in self.__cog_commands__:
|
||||||
|
setattr(self, command.callback.__name__, command)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def get_commands(self):
|
def get_commands(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user