-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.js
34 lines (34 loc) · 993 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**/// Public: loadBot
/**///
/**/// Args
/**/// config - parsed config
/**///
/**/// Returns
/**/// bot - a freshly built shiny new robot
/**///
/**/// Notes
/**/// note - Duct tapes together a boombot
exports.loadBot = function(config) {
var robot = require('./lib/robot')
bot = robot.launch(config.botinfo.auth, config.botinfo.userid, config.roomid)
return bot
}
/**/// Public: run
/**///
/**/// Args
/**/// bot - boombot instance
/**/// events - event handlers
/**/// commands - array of bot commands
/**/// config - parsed config.json
/**/// blacklist - array of blacklist objects
/**/// version - bot version
/**///
/**/// Returns
/**/// return - a fully operational battle station
/**///
/**/// Notes
/**/// note - tells the robot to listen and respond
exports.run = function(bot, events, commands, config, blacklist, version) {
var robot = require('./lib/robot')
return robot.run(bot, events, commands, config, blacklist, version)
}