PhantomBot Version: 2.4.2
OS Version: Ubuntu 16.04
Java Version: 1.8.0_151
Browser and Version (for Panel Support): 71.0.3578.98
Stock PhantomBot: Yes
Let us know what help you need:
Hello, I’m looking to get help for my bot.
My bot relies on multiple uses of keywords to respond in chat with appropriate emotes. I have maybe 20 of these keywords set up.
Recently, a user discovered that they can type multiple of the keywords into a single message, and the bot responds in a long list of the intended responses resulting from the keywords. This ends up making the bot spam the chat.
If user types:
User: “keywordA keywordB keywordC keywordD keywordE …”
Is there any functionality that would let me prevent this? My first idea is to have a regex for each keyword that rejects if multiple keywords are in the string, but I would imagine I would have to update all the regexes every time I wanted to add a new keyword.
Thanks in advance for any help!