[commands] Automatically unload top level app commands in extensions

This commit is contained in:
Rapptz committed 2022-03-12 09:24:26 -05:00
1 parent a672455ca9
commit 0ef369c0fa
5 files changed
+55 -7

No files matched your search

+2
View File
@@ -263,6 +263,8 @@ class Cog(metaclass=CogMeta):
if cls.__cog_is_app_commands_group__:
# Dynamic attribute setting
self.__discord_app_commands_group_children__ = children # type: ignore
# Enforce this to work even if someone forgets __init__
self.module = cls.__module__ # type: ignore
return self