-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Writing on the Bot prototype seems a bad idea to me.
What about creating a mixin option like underscore do to extend the bot functionnalities ?
bot.mixin
hear: (regex, callback) ->
event: 'user:talk'
trigger: (r) -> #...Allow better control on what is added as prototype method.
Even extending the class seems nicer to me :
class MyBot extends fatbot.Bot
constuctor: (settings, myargument, args...)
super(settings, args...)
@coolstuff = myarguments.coolstuff
# ...
hear: (regex, callback) ->
#...
bot = new MyBot settings, stuff
bot.connect()Metadata
Metadata
Assignees
Labels
No labels