3 ms·
God I wish my team had a Hubot.
by brown9-2 15y ago
God I wish my team had a Hubot.
- snprbob86 15y agoI coded up a HipChat bot in < 100 lines of CoffeeScript. It leverages the existing module system to make plugin writing hilariously easy: if msg[0] == '!' [cmd, args...] = msg.slice(1).split(' ') require("commands/#{cmd}").exec(chat, args) Just add a coffee file to the commands directory and export an `exec` function which callc `chat.reply` -- couldn't be easier!