Facebook Messenger bot for random commands (and lols ofc). Built with facebook-chat-api.
Clone repository, install dependencies.
git clone github.com/kshvmdn/messengerbot && cd messengerbot
npm install
Configure account/friend msg IDs
touch config.js
Add the following to config.js
.
module_exports = {
'EMAIL': '', // FB email
'PASS': '', // FB pass
// add for every friend that you want to use kick/add functionality with
'FRIEND_NAME': FRIEND_MSG_ID // see below to find this value
}
Either find FRIEND_MSG_ID
by
- manually parsing through the XHR responses (check the network tab in devtools) or
- adding the following line to
index.js
, then running the program and waiting for the target to message (FRIEND_MSG_ID
ismessage.senderID
).
...
var listen = api.listen(function callback(err, message) {
console.log(message); // add this (line 16)
...
Run the app.
node index.js
The bot should be running. Add it to your group chat and you're ready!
Feel free to make a pull request or open an issue! All contributions are welcome.