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)
评论列表
文章目录