fix bug where slash command with space in the name wouldn't ru n
This commit is contained in:
parent
23422074fe
commit
e15e8ce949
1 changed files with 2 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue