aboutsummaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.js b/src/main.js
index 97ac2dc..d0bb7d6 100644
--- a/src/main.js
+++ b/src/main.js
@@ -64,7 +64,11 @@ function parseCMD(message) {
if (!client.commands.has(CMD_NAME)) return false;
- client.commands.get(CMD_NAME).execute(client, message, args);
+ 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;
}