Skip to content

kshvmdn/messengerbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MessengerBot

Facebook Messenger bot for random commands (and lols ofc). Built with facebook-chat-api.

Usage

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 is message.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!

Contribute

Feel free to make a pull request or open an issue! All contributions are welcome.

About

A bot for Facebook Messenger.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published