Skip to main content

map_available_commands_from_json

Function map_available_commands_from_json 

Source
pub fn map_available_commands_from_json(arr: &[Value]) -> Vec<AvailableCommand>
Expand description

Parse a slash_commands / commands array into AvailableCommands. Entries are either bare name strings (the system/init slash_commands shape) or {name, description, argumentHint} objects (the commands_changed shape); both flow through here so init and the live refresh share one boundary. Non-string / nameless entries are skipped; an empty argumentHint collapses to None.