* Execute method implementation warning

This commit is contained in:
Indrajith K L
2021-03-29 00:15:24 +05:30
parent 5ca85d82db
commit b733bbdf86
2 changed files with 6 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
## Documentation
- ```main.js``` is the entry file
- ```commands.config.json``` is the main config file which holds the ```command``` & ```command``` file path.
- ```commands.config.json``` is the main config file which holds the ```command``` & ```command file path``` .
- ```src/commands``` folder contains all the commands that is configured in ```commands.config.json```. A mandatory method ```execute``` should be implemented, that will be the default execution method while triggerring a command
### Prerequisites

View File

@@ -64,7 +64,11 @@ function parseCMD(message) {
if (!client.commands.has(CMD_NAME)) return false;
if (typeof client.commands.get(CMD_NAME).execute === "function") {
client.commands.get(CMD_NAME).execute(client, message, args);
} else {
console.log(`execute method is not implemented for ${CMD_NAME}.js`);
}
return true;
}