Skip to content

This is an advanced Node.js script that automates the creation of Telegram groups using the GramJS library and generates dynamic content using the Google Gemini 1.5 Flash API.

Notifications You must be signed in to change notification settings

mesamirh/TG-GroupCreate-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🤖 AI-Powered Telegram Group Creator

This is an advanced Node.js script that automates the creation of Telegram groups using the GramJS library and generates dynamic content using the Google Gemini 1.5 Flash API.

The script logs into a personal Telegram account, creates a new group with an AI-generated name and description, and then posts a series of unique, AI-generated welcome messages to the group. It's designed with a user-friendly, colorful command-line interface and includes important safety features to mimic human behavior.

✨ Features

  • AI-Generated Content: Uses the Gemini API to dynamically create unique group names, descriptions, and welcome messages.
  • Secure Authentication: Logs into your Telegram account using your phone number and saves your session using a StringSession so you don't have to log in every time.
  • Human-Like Behavior: Implements randomized delays between actions (30-90 seconds) and between messages (15-45 seconds) to avoid account limitations.
  • Multiple Messages: Sends a random number of messages (between 5 and 10) to each newly created group.
  • Interactive CLI: A colorful and easy-to-use command-line interface that guides you through the process.
  • Statistics: Tracks the number of groups created during a session.
  • Continuous Mode: Allows you to create multiple groups in a loop without restarting the script.
  • Environment-Based Configuration: Keeps your sensitive credentials safe using a .env file.

📋 Prerequisites

Before you begin, you will need the following:

  1. Node.js: Version 16.x or higher.
  2. Telegram Account: A personal Telegram account.
  3. Telegram API Credentials:
  4. Google Gemini API Key:

🚀 Setup & Installation

  1. Clone the Repository (or download the files):

    git clone https://github.com/mesamirh/TG-GroupCreate-Bot.git
    cd TG-GroupCreate-Bot
  2. Install Dependencies:

    npm install
  3. Create a .env file in the root of the project directory. Copy the following content into it:

    # Get these from my.telegram.org
    API_ID=
    API_HASH=
    
    # Get this from Google AI Studio
    GEMINI_API_KEY=
    
    # This will be filled in automatically on the first run
    STRING_SESSION=
  4. Fill in your credentials in the .env file for API_ID, API_HASH, and GEMINI_API_KEY.

▶️ How to Run

  1. Start the script from your terminal:

    node index.js
  2. First-Time Login: The first time you run the script, it will ask for your phone number, password (if you have one), and the 2FA code sent to you by Telegram.

  3. Save Your Session: After a successful login, a StringSession will be printed to the console. Copy this entire string and paste it into the STRING_SESSION variable in your .env file. This will allow the script to log in automatically in the future.

  4. Follow the Prompts: The script will then guide you through creating groups. You can choose to create more groups or exit the script when you are done.

⚠️ Disclaimer

This script is intended for educational and personal use. Automating user actions on Telegram can be against their Terms of Service. The built-in delays are designed to reduce the risk of your account being limited, but the risk is not zero. Do not decrease the delays significantly. The creators of this script are not responsible for any consequences of its use.

About

This is an advanced Node.js script that automates the creation of Telegram groups using the GramJS library and generates dynamic content using the Google Gemini 1.5 Flash API.

Topics

Resources

Stars

Watchers

Forks