A Telegram bot powered by Gemini AI.
- Python 3.10 or newer (recommended)
- Telegram Bot Token
- Gemini API Key
-
Clone the repository
git clone <your-repo-url> cd MyBot
-
Create a virtual environment (recommended)
python -m venv venv .\venv\Scripts\Activate.ps1 -
Install required packages
pip install -r requirements.txt -
Configure environment variables
- Copy
BOT_TOKEN.env.examplethànhBOT_TOKEN.envtrong thư mục project. - Add your tokens:
TELE_BOT_TOKEN=your-telegram-bot-token GEMINI_API_KEY=your-gemini-api-key
MONGO_URI=your-mongodb-uri MONGO_DB_NAME=Telegram_bot_database MONGO_COLLECTION=gold-price-collection
- Copy
-
Run the bot
python BOT.py
- If you get
ModuleNotFoundError, ensure you activated your virtual environment and installed all packages. - Check your
.envfile for correct token names and values.
MIT (or specify your license)