basicbot.py 文件源码

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

项目:TnyBot-Discord 作者: 00firestar00 项目源码 文件源码
def __init__(self, command_prefix=commands.when_mentioned_or("#!"),
            formatter=None,
            name="BasicBot",
            description="""Tnybot is a basic bot that includes custom commands and notifications""",
            pm_help=False, **options):
        self.unit_tests = options.pop('unit_tests', False)
        super().__init__(command_prefix, formatter, description, pm_help, **options)

        self.name = name
        if not self.unit_tests and not sys.platform.startswith('win'):  # pragma: no cover
            # This is needed for safe shutdown on Heroku.
            self.loop.add_signal_handler(getattr(signal, "SIGTERM"), self.exit)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号