A versatile Telegram bot powered by AI for image generation, information retrieval, and entertainment
Niite Bot is a feature-rich Telegram bot that combines AI capabilities with utility functions to provide a seamless user experience. Built with Node.js and modern APIs, it offers everything from AI image generation to real-time information services.
- Image generation using multiple Hugging Face models
- Smart model selection for different art styles
- Image regeneration and customization options
- AI-powered image upscaling with Real-ESRGAN (4x upscaling with face enhancement)
- Real-time timezone information
- Currency conversion
- Random facts with relevant images
- Joke generation
- Reddit meme integration
- Maintenance mode management
- User activity monitoring
- Broadcasting capabilities
- System statistics and analytics
- Command usage tracking
- Runtime: Node.js
- Main Dependencies:
- node-telegram-bot-api
- @huggingface/inference
- @google/generative-ai
- moment-timezone
- natural (NLP)
- sharp (image processing)
- extract-zip
- dotenv
- Clone the repository
- Install dependencies:
npm install
-
Install Vulkan Runtime (Required for AI image upscaling):
- Download from Vulkan Runtime
- Run the installer
- Restart your system if prompted
-
Create a
.env
file with required credentials:
TELEGRAM_BOT_TOKEN=your_token
HUGGING_FACE_TOKEN=your_token
GOOGLE_AI_API_KEY=your_key
ADMIN_USER_ID=your_admin_id
UNSPLASH_ACCESS_KEY=your_key
PIXABAY_API_KEY=your_key
NINJA_API_KEY=your_key
- Start the bot:
node bot.js
To run the games feature, you'll need to set up Cloudflared:
-
Download Cloudflared:
- Windows: Download cloudflared-windows-amd64.exe
- Linux:
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
- Mac:
brew install cloudflare/cloudflare/cloudflared
-
Rename the downloaded file:
- Windows: Rename to
cloudflared.exe
- Linux/Mac: Rename to
cloudflared
- Windows: Rename to
-
Place the file in your project root directory
The tunnel will automatically start when you run the bot.
TELEGRAM_BOT_TOKEN
: Your Telegram bot tokenHUGGING_FACE_TOKEN
: Hugging Face API tokenGOOGLE_AI_API_KEY
: Google AI API keyADMIN_USER_ID
: Telegram user ID for admin accessUNSPLASH_ACCESS_KEY
: Unsplash API key (optional)PIXABAY_API_KEY
: Pixabay API key (optional)NINJA_API_KEY
: API Ninjas key (optional)