better error message for slash command run thingy
This commit is contained in:
parent
f19ac5950f
commit
8113cde7f6
1 changed files with 4 additions and 1 deletions
|
|
@ -60,7 +60,10 @@ export async function* llmStreamChat(
|
|||
true,
|
||||
);
|
||||
if (!slashCommand.run) {
|
||||
throw new Error(`Slash command ${command.name} is not a legacy command`);
|
||||
console.error(
|
||||
`Slash command ${command.name} (${command.source}) has no run function`,
|
||||
);
|
||||
throw new Error(`Slash command not found`);
|
||||
}
|
||||
|
||||
const gen = slashCommand.run({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue