search.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:Harmonbot 作者: Harmon758 项目源码 文件源码
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")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号