mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-13 07:48:37 +01:00
Add hint to run /help in unknown command error message
This commit is contained in:
parent
45c12fb684
commit
d880b23d32
@ -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…
x
Reference in New Issue
Block a user