Skip to content

Lumina is a Telegram bot assistant designed to provide intelligent interactions, automated responses, and versatile communication tools.

License

Notifications You must be signed in to change notification settings

JohnDev19/Lumina-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lumina Bot

Lumina Bot Logo Lumina

Lumina is a Telegram bot assistant designed to provide intelligent interactions, automated responses, and versatile communication tools.

🤖 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:
      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:

    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:

    botFather

    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:

    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
  2. Installation:

    npm install
  3. Run the Bot:

    node index.js

Deploying Lumina (Render)

📜 Command Structure

Lumina's commands follow a standardized structure:

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 for details

💬 Support

Encounter issues? Open a GitHub issue or contact support through Telegram.


Lumina: Your Intelligent Telegram Companion 🌟

About

Lumina is a Telegram bot assistant designed to provide intelligent interactions, automated responses, and versatile communication tools.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published