Skip to content

sebstrgg/messenger-discord

 
 

Repository files navigation

messenger-discord

Facebook Messenger to Discord bridge for Node.js

Setup

Create new Discord application here

Click "new app", choose a name for your application, confirm by clicking "create app"

Add "bot user" to your application

Open "OAuth URL Generator", choose scope "bot" and copy link to your browser

Add your bot to chosen guild

Try not to create channels in bots category. If you really need, make sure the channel hasn't got only numbers in its topic.

Install Node.js - download here

Usage

If you don't know what Docker is, use "Local install"

Local install

git clone https://github.com/Bjornskjald/messenger-discord # or download a zip from GitHub repo and extract it to folder of your choice
cd messenger-discord # if you download the zip you might need to provide a full path, like C:\Users\User\Downloads\messenger-discord
npm install

Copy/rename "config.example.json" to "config.json" and fill it with needed info:

  • Discord token
  • Facebook username/email
  • Facebook password

Everything else is optional.

Docker install

docker run -d -e FACEBOOK_LOGIN=facebook@username.or.email -e FACEBOOK_PASSWORD=yourfacebookpass -e DISCORD_TOKEN=token Bjornskjald/messenger-discord

Configuration

Environmental variable Value in config Description Optional Default value
FACEBOOK_USERNAME facebook.username Facebook username ✖️ none
FACEBOOK_PASSWORD facebook.password Facebook password ✖️ none
DISCORD_TOKEN discord.token Discord token ✖️ none
FACEBOOK_FORCELOGIN facebook.force Forces logging in to Facebook (mostly caused by latest logins review) ✔️ false
DISCORD_GUILD discord.guild Discord guild ✔️ (first guild available)
DISCORD_CATEGORY discord.category Category of channels on Discord ✔️ messenger
DISCORD_SHOW_USERNAME discord.showUsername Enables showing Discord username in Facebook messages ✔️ true

Usage

npm start

The bot will automatically create channels corresponding to threads on Messenger, sending message to these channels will send it to Messenger

Troubleshooting

  • Restart the bridge
  • Remove appstate.json file
  • Check your internet connection
  • Make sure no text in config has trailing spaces
  • Login with a browser to check for pending login reviews
  • If this doesn't work, create new issue here with your error log

About

Facebook Messenger to Discord bridge

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%