Closed ghost closed 10 years ago
its because you have the word stable inside of your phrases, and its matching that, and as a result saying something else. since the bot is just an account with a script attached to it, when it says something the speak event is triggered like if anyone else was to say something. it then attempts to match words in its own phrase, you either have to change the regex or add extra conditions which i have done below.
try changing
if (data.text.match(/stable/i))
to
if (data.text.match(/stable/i) && data.userid != USERID)
assuming the AUTH, USERID, ROOMID, variables in your script haven't been changed to mean something different, this should tell the bot not to attempt a match when its the one saying one of these phrases
Thanks for the help. :)
When I was testing out a new feature on Chillster, this morning, the /stable command made him say multiple lines from the database instead of 1.
Code: