https://github.com/johndev19/lumina-bot
Lumina is a Telegram bot assistant designed to provide intelligent interactions, automated responses, and versatile communication tools.
https://github.com/johndev19/lumina-bot
assistant bot chatbot telegram telegram-chatbot
Last synced: 10 months ago
JSON representation
Lumina is a Telegram bot assistant designed to provide intelligent interactions, automated responses, and versatile communication tools.
- Host: GitHub
- URL: https://github.com/johndev19/lumina-bot
- Owner: JohnDev19
- License: mit
- Created: 2025-01-26T12:01:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-26T12:10:29.000Z (over 1 year ago)
- Last Synced: 2025-01-26T13:22:15.269Z (over 1 year ago)
- Topics: assistant, bot, chatbot, telegram, telegram-chatbot
- Language: JavaScript
- Homepage:
- Size: 557 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lumina Bot


Lumina is a Telegram bot assistant designed to provide intelligent interactions, automated responses, and versatile communication tools.
- Join here: https://t.me/+K3SoAlqE9_RjMzE1
## 🤖 Key Features
### Communication
- **AI-Powered Responses**: Intelligent and context-aware conversations
- **Automated Greetings**: Smart, personalized welcome messages
- **Voice Generation**: AI-generated voice responses with `/Lumina` command
- **ChatGPT Integration**: Direct access to advanced AI conversations with `/ChatGPT` command
## 🔐 Administrative Requirements
### Group Integration
- **Admin Privileges Required**:
- Lumina requires admin privileges to function fully in group chats
- Without admin rights, bot functionality will be limited
### Owner Management
- **Exclusive Owner Commands**
- Specific commands are restricted to bot owner
- Owner identified by `OWNER_ID` in environment configuration
- Example of owner-only command structure:
```javascript
module.exports = {
name: 'sampleName',
description: 'sampleDescription',
owner: true,
execute: async (bot, msg, args, db) => {
}
}
```
## 🚀 Getting Started
### Prerequisites
- Node.js (v14.0.0 or higher)
- npm (Node Package Manager)
- Telegram account
### Configuration
1. **Environment Variables**:
Create a `.env` file with the following configurations:
```plaintext
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
OWNER_ID=your_telegram_user_id
URL=https://your_deployment_url
UPTIME_URL=your_uptime_monitoring_url
```
**- Obtaining Bot Token**:

1. Visit BotFather on Telegram
2. Use the /newbot command to create a new bot
3. Choose a name and username for your bot
4. BotFather will provide you with a bot token
**- Obtaining ID**:

1. **Search for a User ID Bot**: You can search for a bot like @userinfobot on Telegram.
2. **Start the Bot**: Click on the bot and press the "Start" button.
3. **Get Your User ID in .env**: The bot will respond with your user ID and other information.
4. **Setting up your Owner ID**:
`OWNER_ID=your_telegram_user_id`
**- Webhook Configuration**
1. The bot uses a webhook for receiving updates
2. Set the URL and PORT in the .env file
3. Ensure your hosting platform supports webhooks
3. **Installation**:
```bash
npm install
```
4. **Run the Bot**:
```bash
node index.js
```
## Deploying Lumina (Render)
- [Read more here](DEPLOYMENT.md)
## 📜 Command Structure
Lumina's commands follow a standardized structure:
```javascript
module.exports = {
name: 'commandName', // Unique command identifier
description: 'Command purpose', // Brief description of the command
owner: false, // Optional: Restrict to bot owner
execute: async (bot, msg, args) => {
// Command implementation
}
};
```
### Command Properties
- `name`: The trigger for the command (e.g., 'fact')
- `description`: Explains what the command does
- `owner`: (Optional) Boolean to restrict command to bot owner
- `execute`: Async function containing the command's logic
- `bot`: Telegram bot instance
- `msg`: Message object
- `args`: Optional command arguments
## 🛠 Core Handlers
- **autoReactHandler**
- **automatedResponses**
- **commandHandler**
- **eventReminder**
- **groupManager**
- **moderationTools**
- **ownerHandler**
## 🛡️ Database
1. Uses a simple JSON-based database system
2. Stores user data, group information, and game states
3. Located in the utils/database.js file
## Customization
1. Easily add new commands by creating files in the commands directory
2. Modify existing command behavior in their respective files
3. Customize welcome/goodbye messages and images in the groupManager.js file
## 🔧 Customization
Lumina's behavior can be customized through:
- Handler configurations
- Environment variable settings
- Custom command implementations
## 📜 Commands
### Standard Commands
- `/start`: Initialize bot interaction
- `/help`: Display available commands
- `/Lumina`: Trigger AI-powered response with voice generation
- `/ChatGPT`: Direct access to ChatGPT conversation
### Owner Commands
- `/clearcache`: Clear bot's internal cache
- `/clear`: Clear all messages except confirmation
- `managegroups`: Manage groups: list, leave, or set auto-leave
## 🤝 Contributing
Contributions are welcome! Please submit pull requests or open issues for feature suggestions and improvements.
## 📄 License
MIT License - See [LICENSE](LICENSE) for details
## 💬 Support
Encounter issues? Open a GitHub issue or contact support through Telegram.
---
Lumina: Your Intelligent Telegram Companion 🌟