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