Skip to content

Instantly share code, notes, and snippets.

@albertywu
Created September 16, 2016 15:59
Show Gist options
  • Select an option

  • Save albertywu/06ad9db3dda16a95ab50df7fd17bf1c3 to your computer and use it in GitHub Desktop.

Select an option

Save albertywu/06ad9db3dda16a95ab50df7fd17bf1c3 to your computer and use it in GitHub Desktop.
class Peribot
constructor: (robot) ->
@cache = null
@robot = robot
@robot.brain.on 'loaded', => # ... set up @cache
@listen() # sets up robot listeners
add: (user_or_hashtag) -> # ...
remove: (user_or_hashtag) -> # ...
list: -> # ...
clear: -> # ...
listen: ->
@robot.hear /peribot follow +(\S+)/i, (msg) -> # ...
@robot.hear /peribot unfollow +(\S+)/i, (msg) -> # ...
@robot.hear /peribot list/i, (msg) -> # ...
module.export = Peribot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment