fix bug where slash command with space in the name wouldn't ru n

This commit is contained in:
Nate 2025-02-24 00:01:33 -08:00
parent 23422074fe
commit e15e8ce949

View file

@ -41,8 +41,8 @@ const getSlashCommandForInput = (
if (lastText.startsWith("/")) {
slashCommandName = lastText.split(" ")[0].substring(1);
slashCommand = slashCommands.find(
(command) => command.name === slashCommandName,
slashCommand = slashCommands.find((command) =>
lastText.startsWith(`/${command.name} `),
);
}
if (!slashCommand || !slashCommandName) {