console.adapter¶
适配器¶
- class melobot.protocols.console.adapter.Adapter[源代码]¶
基类:
Adapter[EventFactory,OutputFactory,EchoFactory,Action,ConsoleIO,ConsoleIO]- async send(msg: str, stderr: bool = False, next_prompt_args: dict[str, Any] | None = None) ActionHandleGroup[Echo][源代码]¶
- async raw_output(executor: SyncOrAsyncCallable[(), Any], next_prompt_args: dict[str, Any] | None = None) ActionHandleGroup[Echo][源代码]¶
- 参数:
executor (SyncOrAsyncCallable[(), Any])
- 返回类型:
事件¶
行为(动作)¶
一般来说,无需手动通过这些原始的行为类构建行为,直接调用 Adapter 的输出方法即可。
但仍然提供这些接口用于高级操作。
回应¶
此协议无需回应,因此目前不会创建回应对象。
以下所有对象不会被行为操作方法返回。但仍然提供用于类型注解。