pub async fn trigger_command_status(
command_args: &[String],
raw_input: &str,
session_key: Option<String>,
) -> Result<InternalHookEvent>Expand description
触发 command:status 事件
当用户执行 /status 命令时调用此函数触发 command:status 事件。
事件的 context 包含 command_name、command_args 和 raw_input 字段。
§参数
command_args: 命令参数列表raw_input: 原始输入字符串(如/status)session_key: 可选的会话键
§返回值
返回触发后的 InternalHookEvent,调用者可以访问处理器添加的消息。
§示例
ⓘ
use aster::hooks::internal::trigger_command_status;
async fn handle_status_command() {
let event = trigger_command_status(
&[],
"/status",
Some("session-123".to_string()),
).await.unwrap();
println!("Status command triggered, messages: {:?}", event.messages);
}Validates: Requirements 9.3, 9.5