def __init__(self, bot):
self.bot = bot
# Add commands as search subcommands
for name, command in inspect.getmembers(self):
if isinstance(command, commands.Command) and command.parent is None and name != "search":
self.bot.add_command(command)
self.search.add_command(command)
# Add search subcommands as subcommands of corresponding commands
self.search_subcommands = ((self.imgur, "Resources.imgur"), (self.youtube, "Audio.audio"))
for command, parent_name in self.search_subcommands:
utilities.add_as_subcommand(self, command, parent_name, "search")
评论列表
文章目录