mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-04 15:45:19 +02:00
check if user commands exist
This commit is contained in:
parent
28dba87334
commit
7f11ddc29e
1 changed files with 4 additions and 0 deletions
|
@ -75,6 +75,10 @@ export class Agent {
|
|||
|
||||
const user_command_name = containsCommand(message);
|
||||
if (user_command_name) {
|
||||
if (!commandExists(user_command_name)) {
|
||||
this.bot.chat(`Command '${user_command_name}' does not exist.`);
|
||||
return;
|
||||
}
|
||||
this.bot.chat(`*${source} used ${user_command_name.substring(1)}*`);
|
||||
let execute_res = await executeCommand(this, message);
|
||||
if (user_command_name === '!newAction') {
|
||||
|
|
Loading…
Add table
Reference in a new issue