Add hint to run /help in unknown command error message
This commit is contained in:
parent
45c12fb684
commit
d880b23d32
1 changed files with 2 additions and 2 deletions
|
@ -940,14 +940,14 @@ export default class App extends Component {
|
||||||
|
|
||||||
var cmd = commands[name];
|
var cmd = commands[name];
|
||||||
if (!cmd) {
|
if (!cmd) {
|
||||||
this.setState({ error: "Unknown command '" + name + "'" });
|
this.setState({ error: `Unknown command "${name}" (run "/help" to get a command list)` });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
cmd.execute(this, args);
|
cmd.execute(this, args);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Failed to execute command '" + name + "':", error);
|
console.error(`Failed to execute command "${name}":`, error);
|
||||||
this.setState({ error: error.message });
|
this.setState({ error: error.message });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue