help.py 文件源码

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

项目:SiDBot 作者: TiagoDanin 项目源码 文件源码
def run(self, input, matches):
    if input == 'help':
        t = []
        for plugin in plugins_list:
            p = import_plugin('plugins.{}'.format(plugin))
            t.append(p.name)
        sendList(self, title='List of Plugins', text=False, results=t)
        return
    else:
        if input in plugins_list:
            p = import_plugin('plugins.{}'.format(input))
            if 'hide' in p.config:
                if p.config['hide']:
                    sendFalid(self, title='Plugin', reason='results')
                    return

            sendAbout(self,
                title=p.name,
                about=p.description,
                more_about=p.usage,
                title_url=False,
                url=False,
                img=False
            )
            return
        else:
            sendFalid(self, title='Plugin', reason='results')
            return
    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号