Skip to content

命令相关

源码路径: nahida_bot_sdk.commands

Command result types and command metadata for nahida-bot plugins.


CommandResult

Structured result returned by a command handler.

字段类型默认值描述
message`OutboundMessageNone`None
suppress_responseboolFalse

方法:

text(text: str)

Create a result that sends a plain text response.

outbound(message: OutboundMessage)

Create a result that sends a full outbound message.

none()

Create a result that intentionally sends no response.

CommandInfo

Public metadata about a registered command.

字段类型默认值描述
namestr
descriptionstr
aliasestuple[str, ...]
plugin_idstr

CommandMatch

Result of attempting to match a command from a message.

字段类型默认值描述
matchedbool
namestr''
argsstr''