check if user commands exist

This commit is contained in:
MaxRobinsonTheGreat 2024-01-27 19:24:02 -06:00
parent 28dba87334
commit 7f11ddc29e

View file

@ -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') {