From b733bbdf86da85afe3f408395ec47825c5fa26c5 Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Mon, 29 Mar 2021 00:15:24 +0530 Subject: * Execute method implementation warning --- src/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3