Created
January 28, 2017 15:41
-
-
Save spddl/b5c038df77d47a694098395c2441401e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hangoutsBot = require("hangouts-bot"); | |
let hangout=new hangoutsBot( config.hangout_user , config.hangout_pw ); | |
hangout.on('online', function() { | |
c.Hangoutlog('online') | |
Event.emit('online','hangout'); | |
}); | |
hangout.on('error', function(e) { | |
c.warn('err: '+e); | |
Event.emit('error',e); | |
}); | |
hangout.on('message', function(from, msg) { | |
let temp = config.hangout_kontakt(from) | |
c.Hangoutlog(temp.name + " >> " + msg); | |
Event.emit('message', 'hangout', {'from': from, 'name': temp.name, 'device': temp.device, 'message': msg}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment