Membean Bot is a user-friendly Windows installer that automates the setup and operation of a Node.js-based automation script. Leveraging Puppeteer and OpenAI's API, this bot interacts with Membean's training platform, automating login procedures, navigating training sessions, and intelligently answering questions using AI assistance.
- Features
- Prerequisites
- Installation Guide
- Running the Bot
- Troubleshooting
- Security Considerations
- License
- Additional Resources
- Automated Setup: Installs Node.js, necessary npm packages, and configures the environment with minimal user intervention.
- AI-Powered Assistance: Utilizes OpenAI's API to intelligently answer questions on Membean's platform.
- User-Friendly Interface: Designed for users with limited technical expertise.
- Self-Destruct Mechanism: Ensures the installer cleans up after installation, maintaining a clutter-free system.
Before installing and running Membean Bot, ensure the following:
- Operating System: Windows 10 or later.
- Administrator Privileges: Required to install Node.js and modify system environment variables.
- Internet Connection: Stable connection to download necessary software and interact with Membean and OpenAI APIs.
- Membean Account Credentials: Your Membean username and password.
- OpenAI API Key: Obtainable by creating an account on OpenAI.
Follow the steps below to install and set up Membean Bot on your Windows system.
-
Navigate to the Releases Page:
Visit the Membean-auto-answer Releases on GitHub.
-
Download the Installer:
- Locate the installer file named
membean_bot_installer.exeunder the Assets section. - Click on
membean_bot_installer.exeto download it to your preferred location (e.g., Desktop or Downloads folder).
- Locate the installer file named
-
Locate the Installer:
Navigate to the directory where you downloaded
membean_bot_installer.exe. -
Execute the Installer:
- Double-Click Method:
- Simply double-click the
installer.exefile to launch the installer.
- Simply double-click the
- Double-Click Method:
-
Follow On-Screen Instructions:
The installer will guide you through the setup process, which includes:
-
Node.js Installation:
- Checks if Node.js is installed. If not, it will download and install the latest LTS version automatically.
-
Project Setup:
- Initializes npm, installs required packages, downloads the main script (
main.js), and creates essential configuration files.
- Initializes npm, installs required packages, downloads the main script (
-
Self-Destruct Mechanism:
- After completing the installation, the installer will delete itself to maintain a clean system.
Note: The installer creates a
.envfile with placeholder values, which you need to update with your credentials and API key. -
After running the installer, you need to set up your environment variables to enable the bot to function correctly.
-
Navigate to the Project Directory:
The installer sets up the project in your current working directory (e.g.,
C:\Users\YourName\membean-bot). Navigate to this directory using File Explorer. -
Locate the
.envFile:Inside the project directory, find the
.envfile. This file contains placeholders for your configuration. -
Edit the
.envFile:-
Open with a Text Editor:
- Right-click on the
.envfile and choose Open with > Notepad (or any preferred text editor).
- Right-click on the
-
Update the Variables:
- Replace the placeholder values with your actual credentials and API key.
OPENAI_API_KEY=your_openai_api_key_here USERNAME=your_membean_username_here PASSWORD=your_membean_password_here
-
Save the Changes:
- After updating, save the
.envfile and close the text editor.
- After updating, save the
Security Tip: Ensure that your
.envfile is kept secure and not shared with others to protect your credentials and API key. -
Once installation and configuration are complete, you can start the Membean Bot.
-
Locate the Batch File:
In the project directory (
membean-bot), find the batch file namedrun_membean_bot.bat. This file is used to execute the bot. -
Run the Bot:
-
Double-Click Method:
- Double-click on
run_membean_bot.batto start the bot.
- Double-click on
-
Command Prompt Method:
-
Open Command Prompt.
-
Navigate to the project directory:
cd path\to\membean-bot
Replace
path\to\membean-botwith your actual project path, e.g.,C:\Users\YourName\membean-bot. -
Execute the batch file:
run_membean_bot.bat
-
-
-
Monitor the Bot:
- A browser window will launch automatically, navigating to Membean's login page.
- The bot will handle the login process and begin interacting with training sessions.
- Console logs in the Command Prompt or PowerShell window will provide real-time updates on the bot's actions.
If you encounter issues during installation or while running the bot, refer to the following common problems and their solutions.
- Symptom: Error messages when trying to execute
installer.exe. - Solution:
- Ensure you have administrator privileges. Right-click the installer and select Run as administrator.
- Disable any antivirus or security software temporarily, as they might block the installer.
- Verify that your system meets the prerequisites outlined above.
- Symptom: The bot fails to log in or interact with Membean.
- Solution:
- Double-check that you've correctly entered your Membean username, password, and OpenAI API key in the
.envfile. - Ensure there are no extra spaces or typos in the
.envfile. - The
.envfile should reside in the project root directory.
- Double-check that you've correctly entered your Membean username, password, and OpenAI API key in the
- Symptom: Errors indicating that
nodeornpmcommands are not found. - Solution:
- Ensure that Node.js was successfully installed by the installer.
- Verify that Node.js is added to your system's PATH environment variable.
- Restart your computer to apply environment variable changes.
- Symptom: Authentication failures or rate limit errors when the bot attempts to use the OpenAI API.
- Solution:
- Confirm that your OpenAI API key is correctly entered in the
.envfile. - Check your OpenAI account for any usage limits or restrictions.
- Ensure you have a stable internet connection.
- Confirm that your OpenAI API key is correctly entered in the
- Symptom: The browser window doesn't open, or the bot fails to perform actions on Membean.
- Solution:
- Ensure that Membean's website structure hasn't changed, which might affect the bot's ability to locate elements. Update the script selectors if necessary.
- Check for any error messages in the Command Prompt or PowerShell window for specific issues.
- Make sure that the required npm packages are installed correctly.
-
Protect Your Credentials:
- Never share your
.envfile or expose your Membean credentials and OpenAI API key to others. - Store the
.envfile securely and consider using encryption or secure storage solutions.
- Never share your
-
API Key Usage:
- Monitor your OpenAI API usage to prevent unexpected charges.
- Revoke and regenerate your API key from the OpenAI Dashboard if you suspect it has been compromised.
-
Regular Updates:
- Keep your Node.js and npm packages up to date to benefit from the latest security patches and features.
- Regularly check the GitHub Repository for updates or patches.
This project is licensed under the MIT License. You are free to use, modify, and distribute this software, provided that the original license and copyright notice are included.
- Node.js Documentation: https://nodejs.org/en/docs/
- Puppeteer Documentation: https://pptr.dev/
- OpenAI API Documentation: https://platform.openai.com/docs/api-reference/introduction
- dotenv Documentation: https://github.com/motdotla/dotenv
- PyInstaller Documentation: https://pyinstaller.readthedocs.io/en/stable/
- GitHub Repository: https://github.com/greenstorm5417/Membean-auto-answer
By following this guide, users with minimal technical expertise should be able to install, configure, and run the Membean Bot on a Windows system effortlessly. For any further assistance or feature requests, feel free to open an issue on the GitHub Repository.
Disclaimer: Use this bot responsibly and ensure compliance with Membean's Terms of Service and OpenAI's Usage Policies.