Skip to content

Instantly share code, notes, and snippets.

@jejacks0n
Last active December 25, 2015 23:59
Show Gist options
  • Save jejacks0n/7061305 to your computer and use it in GitHub Desktop.
Save jejacks0n/7061305 to your computer and use it in GitHub Desktop.
BitBot! Bzzzrt.
{
"Bzzzrt": {
"token": ">TOKEN_BZZZRT",
"rooms": ["Jawa Yard Sale"],
"commands": {},
"periodics": {},
"responders": {}
}
}
count = 0
exports.main = (message = m, room = r, callback = exit) ->
callback(speak: "Remote trusted command processor handled `#{message}` in #{room} (#{count += 1} messages so far).")
count = 0
exports.main = (callback = exit) ->
callback(paste: "Remote trusted periodic (notified #{count + 1} #{if (count += 1) == 1 then 'time' else 'times'})")
responder = new Bitbot.SimpleResponder(/bot/, ["I'm a remote trusted simple responder, what can I help you with?"])
exports.main = (message = m, room = r, callback = exit) ->
responder.main(message, room, callback)
count = 0
exports.main = (message = m, room = r, callback = exit) ->
callback(speak: "Remote untrusted command processor handled `#{message}` in #{room} (#{count += 1} messages so far).")
count = 0
exports.main = (callback = exit) ->
callback(paste: "Remote untrusted periodic (notified #{count + 1} #{if (count += 1) == 1 then 'time' else 'times'})")
responder = new Bitbot.SimpleResponder(/bot/, ["I'm a remote untrusted simple responder, what can I help you with?"])
exports.main = (message = m, room = r, callback = exit) ->
responder.main(message, room, callback)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment