O'Reilly logo
  • Ardon Bailey thinks this is interesting:

if (/(hello|hi) (bot|awesomebot)/g.test(msg)) { slack.sendMessage(`Hello to you too, ${user.name}!`, channel.id); }

From

Cover of Building Slack Bots

Note

This doesn't work because the msg variable contains '<uh29393> hello' for me. It looks like it's adding an ID in there.