From 6f15be8e063070533db230f9c6c24a4c81a43ac0 Mon Sep 17 00:00:00 2001 From: Robert Drake Date: Tue, 3 Nov 2020 02:48:39 -0600 Subject: [PATCH] end of work commit --- bot.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bot.js b/bot.js index b41642e..494bdd7 100644 --- a/bot.js +++ b/bot.js @@ -37,9 +37,14 @@ bot.addListener("pm", function(from, message) { }); bot.addListener("message", (nick, to, text, message) => { - console.log(to); - if(!text.startsWith("*")) { - console.log("Not for me!"); + let arrayText = text.split(" "); + if(!to.startsWith("#")) { return; } + if(!arrayText[0].startsWith("*")) { + console.log("Not for me"); + return; + } + + }); \ No newline at end of file