Bare bones for JSON database

This commit is contained in:
privacy lulz
2021-09-01 20:17:52 +00:00
parent ee58f2d36c
commit 7ca4e650fb
4 changed files with 97 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ class Cog(metaclass=CogMeta):
for command in self.__cog_commands__:
setattr(self, command.callback.__name__, command)
parent = command.parent
if parent is not None:
if parent:
# Get the latest parent reference
parent = lookup[parent.qualified_name] # type: ignore
@@ -230,7 +230,7 @@ class Cog(metaclass=CogMeta):
This does not include subcommands.
"""
return [c for c in self.__cog_commands__ if c.parent is None]
return [c for c in self.__cog_commands__ if not c.parent]
@property
def qualified_name(self) -> str: