Skip to main content

get_command_by_name

Function get_command_by_name 

Source
pub fn get_command_by_name<'a>(
    commands: &'a [Box<dyn SlashCommand>],
    name: &str,
) -> Option<&'a dyn SlashCommand>
Expand description

Get a command by its exact name.

Name can include or omit the leading slash.