A Telegram bot for Secret Trees, a fictional organization focused on reforestation projects and carbon credits.
- 🌲 Information about reforestation projects worldwide
- 💨 Carbon credit purchasing and offsetting
- 🗺️ Location-based forest analysis
- ❓ FAQ system with AI-powered responses
- 🤖 Natural language conversation powered by Google's Gemini API
Secret_Trees/
├── commands/ # Command handlers for the bot
├── config/ # Configuration files
├── services/ # Service modules (AI, etc.)
├── utils/ # Utility functions
├── data/ # Data storage (generated at runtime)
├── logs/ # Log files (generated at runtime)
├── bot.js # Main bot file
├── package.json # Project dependencies
└── .env # Environment variables (create from .env.example)
- Node.js 18 or higher
- A Telegram Bot Token (from BotFather)
- Google Gemini API Key
-
Clone the repository:
git clone https://github.com/your-username/secret-trees-bot.git cd secret-trees-bot -
Install dependencies:
npm install -
Create a
.envfile based on.env.example:cp .env.example .env -
Edit the
.envfile with your API keys:TELEGRAM_BOT_TOKEN=your_telegram_bot_token GEMINI_API_KEY=your_gemini_api_key
Start the bot in development mode:
npm run dev
Or in production:
npm start
/start- Introduction to the bot/forest- Information about reforestation projects/carbon- Carbon credit information and calculator/faq- Frequently asked questions/about- About Secret Trees/help- Help with using the bot
To add new commands, create a new file in the commands/ directory. The filename should be the command name (without the slash).
MIT