def __init__(self, *args, **kwargs):
"""In addition to everything supported by commands.Bot, this also supports:
* `config_file` - An `str` representing the configuration file of the bot. Defaults to
`config.json`. This doesn't really have to be used, but it's there for
convenience reasons.
Instance variables not in the constructor:
* `session` - An `aiohttp.ClientSession` that the bot can use to make HTTP requests.
This is useful for commands that perform API hooks.
* `config` - A `dict` containing key-value pairs meant for bot configuration. This doesn't
really have to be used, but it's there for convenience reasons.
"""
super().__init__(*args, **kwargs)
self.config = {}
self.config_file = kwargs.get("config_file", "config.json")
self.session = aiohttp.ClientSession(loop=self.loop)
评论列表
文章目录