First, thank you to the devs & all the contributors here on the forum!
I am trying to make a response command, if a users post contains certain words, it says certain things. Example:
If the first word is "what" and contains "id" then the bot will post my game ID. After searching the forums, I made this:
!commands add what $(eval `$(query)`.toLowerCase().includes("id") ? "My iD is 123456" : " ")
Which works!! but for my usage, isnt quite what I need, only because this question is asked multiple ways, for example:
- what is your id
- what is your ign
- what is your username
Question 1:
For this to work, I assume I need multiple entries be added to the "includes" code, something like so: includes("id","ign","username")
Is this correct? or is it possible?
Question 2:
As people may ask:
- what is your steam name
- what is your activision id
- what is your blizzard account
Can it give dynamic responses? for example:
User: what is your activision?Nightbot: @user its: 12345User: what is your steam?Nightbot: @user its: 54321
Question 3:
Finally, as someones first word could be "what" or "whats", do I need to add the same command twice? (once to reply to "what" and once to reply to "whats") or can I use a wildcard for matching words? something like !addcom what* CommandFuGoesHere where what* would match whats also?