Code Monkey home page Code Monkey logo

goat-bot-v2's Introduction

banner

Goat Bot - Bot Chat Messenger

Nodejs Support v16.x size code-version visitors size


📝 Note

  • This is a messenger chat bot using a personal account, using an unofficial api (Origin here) and this may lead to facebook account being locked due to spam or other reasons.
  • So, I recommend using a clone account (one that you're willing to throw away at any time)
  • I am not responsible for any problems that may arise from using this bot.

🚧 Requirement

📝 Tutorial

Tutorial has been uploaded on YouTube

Summary instructions:

💡 How it works?

  • 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 the handlerEvents.
  • The handlerEvents will 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 banned or mode admin box only is turned on or not, if not, it will execute the command.
      • next, it will check the permission of the user.
      • next, it will check if the countdown of command is over or not.
      • finally, it will execute the command and log information to the console.
    • onChat:

      • the handler will run when the user sends a message.
      • it will check permission of the user.
      • the handler will execute the command, if it return a function or async function then it willl check user banned or mode admin box only is turned on or not, if not, it will call the function and log information to the console.
    • onFirstChat:

      • the handler will run when get the first message from the chat box since the bot started.
      • the way it works is like onChat.
    • onReaction:

      • the handler will run when the user reacts to a message has messageID is set in GoatBot.onReaction as follows:
         // 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 permission of the user and execute if the user has permission and log information to the console.
    • onReply:

      • the handler will run when the user replies to a message has messageID is set in GoatBot.onReply as follows:
         // 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 permission of the user and execute if the user has permission and log information to the console.
    • onEvent:

      • the handler will run when the user has a new event type event (new user join, user leave chat box, change admin box,...)
         // example:
         global.GoatBot.onEvent.set(msg.messageID, {
         	messageID: msg.messageID,
         	commandName,
         	// ... and more
         });
        • it will loop through all onEvent and get the command determined by the key commandName and execute the onEvent in that command.
        • if it return a function or async function then it will call the function and log information to the console.
    • handlerEvent:

      • the handler will run when the user has a new event type event (new user join, user leave chat box, change admin box,...)
      • it will get all the eventCommand set in GoatBot.eventCommands (scripts placed in the scripts/events folder)
      • it will loop through all eventCommands and run the onStart in that command.
      • if it return a function or async function then it will call the function and log information to the console.

🔔 How to get notification when have new update?

  • Click on the Watch button in the upper right corner of the screen and select Custom and select Pull requests and Releases and click Apply to get notified when there is a new update.

🆙 How to Update

Tutorial has been uploaded on YouTube

🛠️ How to create new commands

💭 Support

If you have major coding issues with this bot, please join and ask for help.

📚 Support Languages in source code

  • Currently, the bot supports 2 languages:

  • en: English

  • vi: Vietnamese

  • Change language in config.json file

  • You can customize the language in the folder languages/, languages/cmds/ and languages/events/

📌 Common Problems

📌 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

DO NOT USE THE ORIGINAL UNDERGRADUATE VERSION

  • 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

📸 Screenshots

  • Bot

Rank system
  • Rank card:

  • Rankup notification:

  • Custom rank card:

Weather

Auto send notification when have user join or leave box chat (you can custom message)

Openjourney

GPT

  • Dashboard

Home:

Stats:

Login/Register:

Dashboard Thread:

Custom on/off:

Custom welcome message (similar with leave, rankup (coming soon), custom command (coming soon))

Copyright (C)

📜 License

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

goat-bot-v2's People

Contributors

anbuinfosec avatar mrselfish01 avatar ntkhang03 avatar sadman-11 avatar tanvir0999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

goat-bot-v2's Issues

Send msg in dm

An error occurred while sending your message to 1 admin
<@61561737120105> (user name)
Check console for more details

Login problem

I opened a new Facebook ID, but I can't login to the bot, it shows an error, Login with cookies, but maximum 1 hour and then error again, reinstall Goatbot many times but same error and use other Facebook Id password but same error show , error is

Login with email & password...
15:04:09 28/05/2024 ACCOUNT INFO: Email: ****, I_User: (empty)
15:04:33 28/05/2024 LOGIN FACEBOOK: An error occurred while signing in
15:04:33 28/05/2024 LOGIN FACEBOOK: Can't login to Facebook, please login to your account to check and fix this problem
15:04:33 28/05/2024 LOGIN FACEBOOK: LOGIN_FAILED: Can't login to Facebook, please login to your account to check and fix this problem
at ⵂⴰⵀⵎ...program_ (/root/bot/login/getFbstate1.js:1:116511)
at ⵂⴰⵀⵎ.... [as nextStep_] (/root/bot/login/getFbstate1.js:1:102352)
at ⵂⴰⵀⵎ.... [as next_] (/root/bot/login/getFbstate1.js:1:100141)
at [as next] (/root/bot/login/getFbstate1.js:1:103628)
at ⵂⵀⵕⵄ (/root/bot/login/getFbstate1.js:1:104164)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Add set name all command

Hi sir
Your goat bot Is very nice. I used this bot since 1 week . But I'm facing one problem in your bot. That is this bot can not change the nickname of whole group members. So I requested you to please add setname all command for setting nickname on all group members .
Thank you
Waiting for your response❤️

Add NLP (Natural Language Processing)

It would be great to Add an NLP × command support, I made something like that before but in python and also only cli... I kidda want to build the bot "maid chan" from anime the pet girl of sakurasou (soon)... btw just create a huge update then obfuscate the intire code... bruh its true that so many people are stolin your code 💀
also some of the code that uses something like the "buffer" code causes memory corruptions, buffer overflows especially the "trigger.js" it always crash when i run the command... (Raspberry pi 4)

so yah wish you luck.

Can't Be reconnected

Can't be reconnected when the internet is down and when the internet is up (can't find attempt to reconnect)

I use termux 😋

email/password login

How did you make an email/password login?, I used your fb chat api but i still cant login using it?

Packages failed install

I have various module imported before this it was working perfectly but after updated it can't be installed. Why?

also it saying "failed to check update" for fb-chat-api

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.