This is a Facebook/Discord bot, that takes images and description from discord, then posts them on an FB Page. Written in NodeJS and uses SQLite as a database. It also utilises Puppeteer to srape images from twitter.
You have to install Node.JS and SQLite (Note: SQLite can be installed by default in different OSs
-
Clone the repository and install dependencies:-
git clone https://github.com/Muramasa95/Facebook-Discord-Bot.git cd Facebook-Discord-Bot npm ci
-
now you have to get API keys for Discord, FB and ImgBB. There is an example .env file to see the important variables.
-
after setting up enviromental variables and installing dependencies, now we test the bot using:-
npm run start:dev
this is for testing the bot before deploying, when you save a file the program restarts. To deploy to production:-
npm run start
After running the bot you can use slash command (/help) or send (##help) to see how to use the bot.
You can also build a docker image for this bot using
docker build . -t social-media-bot:latest
Note: docker image can be large due to shipping it with Puppeteer, you can remove its lines from the dockerfile to achieve much lesser image size.