| Feature | Description |
|---|---|
| 🔐 No Google Auth | No need for Google API credentials or complex OAuth setup |
| ⚡ Fast & Lightweight | Built on unofficial Facebook API for optimal performance |
| 🎭 Role-Based Access | 5-tier permission system (User → Group Admin → Bot Admin → Premium → Developer) |
| 💰 Premium System | Money-based premium features for advanced commands |
| 🛡️ Developer Tools | Built-in shell & eval for developers (role 4) |
| 🎯 Smart Commands | Auto-suggestion for typos & helpful hints |
| ☁️ Deploy Anywhere | Ready for Render, Railway, Replit, VPS, and more |
- 📝 Note
- 🚧 Requirement
- 📝 Tutorial
- 💡 How it works?
- 🔔 How to get notification when have new update?
- 🆙 How to Update
- 🛠️ How to create new commands
- 💭 Support
- 📚 Support Languages in source code
- 📌 Common Problems
- ❌ DO NOT USE THE ORIGINAL UNDERGRADUATE VERSION
- 📸 Screenshots
- ✨ Copyright (C)
- 📜 License
⚠️ Account Safety First
- This bot uses neokex-fca (Facebook Chat API)
- No Google API credentials needed - Simple setup with just your Facebook account
- Using unofficial APIs may risk account restrictions
- Recommended: Use a secondary/clone Facebook account
- The developers are not responsible for any account issues
- 🎖️ Advanced Role System: 5 permission levels (0-4) for granular access control
- 💎 Premium Users (Role 3): Money-based premium features
- 👨💻 Developers (Role 4): Full system access with shell & eval commands
- 🤖 Smart Command Suggestions: Typo detection with closest match suggestions
- 😡 React to Delete: Admins/Devs can react with 😡/😠 to unsend bot messages
- ☁️ Deploy Ready: Pre-configured for Render, Railway & more
- 🎨 Clean Icons: Replaced emoji clutter with elegant Unicode icons
- Node.js 16.x or 20.x Download | Home
- Basic knowledge of JavaScript/Node.js (optional but helpful)
- A secondary/clone Facebook account (recommended)
- No Google API credentials required!
git clone https://github.com/ntkhang03/Goat-Bot-V2.git
cd Goat-Bot-V2
npm installConfigure config.json with your Facebook credentials, then:
npm startChoose your preferred platform:
- Render - Free tier available, auto-deploy from GitHub
- Railway - $5/month free credit, excellent for 24/7 bots
- Replit - Quick setup, perfect for testing
- VPS/Server - Full control, use PM2 for process management
📘 Detailed deployment guide: See DEPLOY.md
- For mobile phone: https://www.youtube.com/watch?v=grVeZ76HlgA
- For VPS/Windows: https://www.youtube.com/watch?v=uCbSYNQNEwY
Summary instructions:
- See here
- The bot uses the unofficial facebook api to send and receive messages from the user.
- When having a
new event(message, reaction, new user join, user leave chat box,...) the bot will emit an event to thehandlerEvents. - The
handlerEventswill handle the event and execute the command:-
onStart:- the handler will check if user
call a command or not. - if yes, it will check if
user bannedor modeadmin box only is turned onor not, if not, it will execute the command. - next, it will check the
permissionof the user. - next, it will check if the
countdownof command is over or not. - finally, it will execute the command and
loginformation to the console.
- the handler will check if user
-
onChat:- the handler will run
when the user sends a message. - it will check
permissionof the user. - the handler will
executethe command, if it return afunctionorasync functionthen it willl checkuser bannedor modeadmin box only is turned onor not, if not, it will call the function andloginformation to the console.
- the handler will run
-
onFirstChat:- the handler will run
when get the first messagefrom the chat box since the bot started. - the way it works is like
onChat.
- the handler will run
-
onReaction:- the handler will run when the user
reactsto amessage has messageIDis set inGoatBot.onReactionas follows:javascript // example: global.GoatBot.onReaction.set(msg.messageID, { messageID: msg.messageID, commandName, // ... and more }); - the handler will automatically add method
delete, if this method is called, it will delete the message from the set. - next, it will check
permissionof the user andexecuteif the user has permission andloginformation to the console.
- the handler will run when the user
-
onReply:- the handler will run when the user
repliesto amessage has messageIDis set inGoatBot.onReplyas follows:javascript // example: global.GoatBot.onReply.set(msg.messageID, { messageID: msg.messageID, commandName, // ... and more }); - the handler will automatically add method
delete, if this method is called, it will delete the message from the set. - next, it will check
permissionof the user andexecuteif the user has permission andloginformation to the console.
- the handler will run when the user
-
onEvent:- the handler will run
when the user has a new eventtypeevent(new user join, user leave chat box, change admin box,...)javascript // example: global.GoatBot.onEvent.set(msg.messageID, { messageID: msg.messageID, commandName, // ... and more });- it will loop through allonEventand get the command determined by the keycommandNameand execute theonEventin that command. - if it return afunctionorasync functionthen it will call the function andloginformation to the console.
- the handler will run
-
handlerEvent:- the handler will run
when the user has a new eventtypeevent(new user join, user leave chat box, change admin box,...) - it will get all the eventCommand set in
GoatBot.eventCommands(scripts placed in thescripts/eventsfolder) - it will loop through all
eventCommandsand run theonStartin that command. - if it return a
functionorasync functionthen it will call the function andloginformation to the console.
- the handler will run
-
- Click on the
Watchbutton in the upper right corner of the screen and selectCustomand selectPull requestsandReleasesand clickApplyto get notified when there is a new update.
Tutorial has been uploaded on YouTube
- on phone/repl: https://youtu.be/grVeZ76HlgA?t=1342
- on vps/computer: https://youtu.be/uCbSYNQNEwY?t=508
- See here
If you have major coding issues with this bot, please join and ask for help.
- https://discord.com/invite/DbyGwmkpVY (recommended)
- https://www.facebook.com/groups/goatbot
- https://m.me/j/Abbq0B-nmkGJUl2C
https://t.me/gatbottt(no longer supported)- Please do not inbox me, I do not respond to private messages, any questions please join the chat group for answers. ThankThanks!
-
Currently, the bot supports 2 languages:
-
en: English -
vi: Vietnamese -
Change language in
config.jsonfile -
You can customize the language in the folder
languages/,languages/cmds/andlanguages/events/
📌 Error 400: redirect_uri_mismatch
1. Enable Google Drive API: Tutorial
2. Add uri https://developers.google.com/oauthplayground (not https://developers.google.com/oauthplayground/) to Authorized redirect URIs in OAuth consent screen: Tutorial
3. Choose https://www.googleapis.com/auth/drive and https://mail.google.com/ in OAuth 2.0 Playground: Tutorial
📌 Error for site owners: Invalid domain for site key
1. Go to https://www.google.com/recaptcha/admin
2. Add domain repl.co (not repl.com) to Domains in reCAPTCHA v2 Tutorial
📌 GaxiosError: invalid_grant, unauthorized_client
- If you don't publish the project in google console, the refresh token will expire after 1 week and you need to get it back. Tuatorial
📌 GaxiosError: invalid_client
- Check if you have entered your google project client_id correctly Tuatorial
📌 Error 403: access_denied
- If you don't publish the project in google console only the approved accounts added to the project can use it Tuatorial
- The use of unknown source code can lead to the device being infected with viruses, malware, hacked social accounts, banks, ...
- Goat-Bot-V2 is only published at https://github.com/ntkhang03/Goat-Bot-V2, all other sources, all forks from other github, replit,... are fake, violate policy
- If you use from other sources (whether accidentally or intentionally) it means that you are in violation and will be banned without notice
VIETNAMESE
- Nếu bạn vi phạm bất kỳ quy tắc nào, bạn sẽ bị cấm sử dụng dự án của tôi
- Không bán mã nguồn của tôi
- Không tự xưng là chủ sở hữu của mã nguồn của tôi
- Không kiếm tiền từ mã nguồn của tôi (chẳng hạn như: mua bán lệnh, mua bán/cho thuê bot, kêu gọi quyên góp, v.v.)
- Không xóa/sửa đổi credit (tên tác giả) trong mã nguồn của tôi
ENGLISH
- If you violate any rules, you will be banned from using my project
- Don't sell my source code
- Don't claim my source code as your own
- Do not monetize my source code (such as: buy and sell commands, buy and sell bots, call for donations, etc.)
- Don't remove/edit my credits (author name) in my source code


























