(input: string)
| 25 | const commandNames = new Set<string>(slashCommands.map((command) => command.name)) |
| 26 | |
| 27 | export function getSlashCommand(input: string): SlashCommandName | undefined { |
| 28 | const [command] = input.trim().split(/\s+/, 1) |
| 29 | return commandNames.has(command) ? (command as SlashCommandName) : undefined |
| 30 | } |
| 31 | |
| 32 | export function formatSlashCommandHelp() { |
| 33 | return slashCommands |