From 80e50d97124c078b241c5921ab862c7a33e74339 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 4 Apr 2021 20:51:14 -0500 Subject: [PATCH] Return if usersWith command has no parameters --- bot.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot.js b/bot.js index ed4ddce..7c9e922 100644 --- a/bot.js +++ b/bot.js @@ -536,6 +536,10 @@ async function helpMessage(message) { } async function usersWith(message) { + if (message.content.split(" ").length < 2) { + message.reply("query must contain at least 3 characters!") + return; + } if (message.content.split(" ")[1].length < 3) { message.reply("query must contain at least 3 characters!") return;