mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-21 00:07:51 +00:00
[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.
|
||||
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
|
||||
|
||||
def get_commands(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user