This is a Telegram bot designed to help administrators manage their Telegram groups or channels efficiently. The bot provides various administrative tools, such as user management, automated responses, scheduled messages, and more.
- User Management: Kick, ban, or mute users from the group.
- Job Scheduling: Run periodic tasks using the built-in job queue.
- Python 3.11.9+
- uv: A dependency manager for Python.
-
Clone the repository:
git clone git@github.com:itanc-com/itelebot.git cd itelebot -
Install uv:
If you don't have uv installed, you can install it via the following command:
curl -LsSf https://astral.sh/uv/install.sh | shOr via pipx:
pipx install uv
-
Create the virtual environment:
Create virtual environment by uv:
uv sync
source .venv/bin/activate -
Set up environment variables:
Create a env folder in that folder create
.envfile in the root directory and add your Telegram bot token and other configuration settings:TOKEN=your-telegram-bot-token BOT_USERNAME="@your bot username " CHAT_ID="-xxxxxx" POOL_SIZE =x TIMEOUT=x RATE_LIMIT_REQUESTS=xx RATE_LIMIT_PERIOD=x
Replace
your-telegram-bot-tokenandyour bot usernamewith the actual token provided by the BotFather. -
Run the bot:
Start the bot by running the main script:
python3 main.py