This repository was archived by the owner on Aug 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
配置参数介绍
Tarrailt edited this page Nov 11, 2021
·
1 revision
以下是Cesloi
的__init__
函数:
def __init__(
self,
*,
bot_session: BotSession,
delegate: Optional[EventDelegate] = None,
logger: Optional[Logger] = None,
debug: bool = False,
enable_chat_log: bool = True,
):
bot_session
: 一个接受存储了会话信息的类的参数
delegate
: 一个接受Cesloi事件系统类EventDelegate
的参数,通常你不需要写入它
logger
: 一个接受日志类的参数,通常你不需要写入它
debug
: boolean参数,控制日志是否将debug信息写入文件,通常你不需要改变它
enable_chat_log
: boolean参数,控制客户端是否将好友/群聊/陌生人消息输出到日志
以下是BotSession
的__init__
函数:
def __init__(
self,
host: str,
account: Optional[int] = None,
verify_key: Optional[str] = None,
*,
single_mode: bool = False,
) -> None:
host
: 一个接受网络地址的参数, mirai-api-http
服务所在的根接口地址
account
: 一个接受QQ账号的参数, 应该为应用所使用账号的整数 ID; singleMode 模式下为空, 非 singleMode 下新建连接不可为空
verify_key
: 一个接受指定字符串的参数, 应该与配置文件中指定的字符串相同, 用以与mirai-api-http
绑定账号
single_mode
: boolean参数, 是否开启singleMode模式, 不建议填入True