Skip to content

Instantly share code, notes, and snippets.

@clauswitt
Created May 23, 2014 10:01
Show Gist options
  • Save clauswitt/09bfa05e682e299e42b1 to your computer and use it in GitHub Desktop.
Save clauswitt/09bfa05e682e299e42b1 to your computer and use it in GitHub Desktop.
Pump Den Funk Bot
# Description:
# Pump den funk
#
# Dependencies:
# None
#
# Configuration:
#
#
# Commands:
#
#
# Author:
# clauswitt
module.exports = (robot) ->
listening = false
funk_count = 0
robot.hear /pump den/i, (msg) ->
if listening
funk_count = funk_count + 1
if funk_count > 2
listening = false
msg.send("funk!")
robot.hear /.* siger pump den siger i funk/i, (msg) ->
listening = true
funk_count = 0
msg.send('...')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment