Is there a way to let the bot listen on two commands?
My try was:
bot.onText(/^(\/cmd1||\/cmd2)/, function(msg, match) {})
But I was not able to get it to work.
Only one |, no brackets and ^ also on second option.
Use website like regex101 to test before :)
bot.onText(/^\/cmd1|^\/cmd2/, function(msg, match) {})
Most helpful comment
Only one |, no brackets and ^ also on second option.
Use website like regex101 to test before :)
bot.onText(/^\/cmd1|^\/cmd2/, function(msg, match) {})