PLEASE READ THIS. THIS IS IMPORTANT.
You see... This thing
uses an Unofficial Facebook Chat API. This means you need a Burner Facebook account (an account you can easily throw to the bin. Kobe!) or you'll risk your account getting banned.
JUST DON'T USE YOUR REAL FB ACCOUNT. OKAY?. GOOD.
I'm a beginner and I'm still learning, so there might be some bugs... and I'm not sure if I'm doing everything right. anyways, have fun with this bot. If you're looking at the code right now, my apologies.. It might look messy but it works.
This is but a simple bot that can do stuff in your Facebook group chat.
-
Automate the following:
- Listing or recording a lists of things.
- Googling stuff. ik not much...
-
Pinning a message.
-
Meme generator
-
Urban dictionary
- Add a pin command.
- Snipe command.
- Add fun stuff. (idk what fun stuff I'll add.)
- Give every thread a custom config.
- Clean up the code.
- I'm out of ideas, please suggest some.
I Hope everything here is clear enough and understandable since english is not my first language.
You need to install these things.
Either clone it through git clone https://github.com/PedjPedj/Facebook-gc-bot.git
or download the .zip file then extract it.
Just open the folder where the files are located.
Note: I am honestly not sure how to make a executable batch script for windows. So... you'll need to run it using VSCode.
Open a terminal in vs code.
You need to install the modules first using npm install
.
then run the script using node .
or npm start
.
Do chmod +x start.sh
and then ./start.sh
Choose 'start'. You'll be prompted to setup your bot and Fb account first.
Make sure your credentials are correct! or else you're most likely to get blocked by Facebook. If that happened, just open your browser and verify your account.
These stuff are all self explanatory but I'll still try to explain them anyway.
-
Prefix - The prefix for the bot. This will be used to trigger the bot.
-
Bot name - The name of the bot. This is optional. The only thing it does is... if you @mention the bot, it will respond with a message defined by the 'response' in the config.
-
Response - The response of the bot if @mentioned.
-
Thread Id - The id of your group chat. This can be found in the url of the chat. This is used for locking the bot to a specific chat.
-
Wolfram App ID - This is simply an app id for the Wolfram Alpha API. You can get one for free at https://developer.wolframalpha.com/
-
Gc Lock - This is a boolean value. If it's true, the bot will only respond to the group chat defined by thread id in the config.
-
Cooldown - This is the cooldown time in seconds. The bot will not respond to the same command or sender within this time. ( x * 1000) = seconds of cooldown.
Imgflip
-
Username - The username of the imgflip account.
-
Password - The password of the imgflip account.
Sometimes you might get some random errors. Most of the time it's just Facebook blocking you... open browser then verify account.
Or the bot is not part of any group chat yet... make sure the account you're using is part of a group chat.
If you have any other issues, let me know! Please don't hesitate to open an issue. I'll try my best to help you.
If you have any suggestions, please don't hesistate to open a pull request. I would love to hear from you and learn.