first commit
This commit is contained in:
10
lightcontroller.js
Normal file
10
lightcontroller.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const http = require('http')
|
||||
|
||||
module.exports = function (myEmitter) {
|
||||
myEmitter.on('text', text => {
|
||||
if (text.text.search('ight') > -1) {
|
||||
if (text.text.search('on') > -1) http.get('http://localhost:3434/on')
|
||||
if (text.text.search('of') > -1) http.get('http://localhost:3434/off')
|
||||
}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user