From d880b23d322042393e36318e3afabb6892e70103 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 27 May 2021 12:54:30 +0200 Subject: [PATCH] Add hint to run /help in unknown command error message --- components/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/app.js b/components/app.js index bee821f..00f412e 100644 --- a/components/app.js +++ b/components/app.js @@ -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 }); } }