mirror of
https://git.sr.ht/~emersion/gamja
synced 2025-03-25 06:21:18 -04:00
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];
|
||||
if (!cmd) {
|
||||
this.setState({ error: "Unknown command '" + name + "'" });
|
||||
this.setState({ error: `Unknown command "${name}" (run "/help" to get a command list)` });
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
cmd.execute(this, args);
|
||||
} catch (error) {
|
||||
console.error("Failed to execute command '" + name + "':", error);
|
||||
console.error(`Failed to execute command "${name}":`, error);
|
||||
this.setState({ error: error.message });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue