Skip to content

Telegram group management bot built using grammY + GramJS MTProto as utility.

License

Notifications You must be signed in to change notification settings

ryukaizen/lucyna

Repository files navigation

Lucyna Kushinada

A Telegram Chat Management Bot

Built using grammY & GramJS

🎀 Can be found on Telegram as LucynaBot

Features

This bot offers a variety of chat management features to help you keep your Telegram groups organized and secure. Below is a list of available modules:

  • Admin: Manage administrative tasks and settings.
  • AniList: Integration with AniList to provide anime-related information.
  • Antiflood: Prevent spam by limiting the number of messages a user can send in a short period.
  • Bans: Ban users from the chat.
  • Blacklists: Create and manage blacklists to automatically remove unwanted content.
  • Cleanservice: Clean up service messages to keep the chat tidy.
  • Extras: Additional features and utilities.
  • Filters: Set up custom filters to automatically respond to specific messages.
  • Fun: Fun commands to engage with chat members.
  • Greetings: Send welcome messages to new members.
  • Locks: Lock specific types of messages (e.g., media, links) to control chat content.
  • Mutes: Mute users to prevent them from sending messages temporarily.
  • Notes: Save and recall notes.
  • Purges: Bulk delete messages.
  • Reports: Report messages to administrators.
  • Rules: Define and display chat rules.
  • Users: Manage user settings and permissions.
  • Warns: Warn users for rule violations.

Installation

Follow these steps to install and set up the bot:

  1. Clone the repository:

    git clone https://github.com/ryukaizen/lucyna.git
    cd lucyna
  2. Install Node.js and npm: Ensure you have Node.js and npm installed. You can download them from here.

  3. Install TypeScript:

    npm install -g typescript
  4. Install dependencies:

    npm install
  5. Set up environment variables:

    cp .env.example .env
  6. Edit and fill up all the relevant environment variables inside the .env file

  7. Add PostgreSQL URL, Telegram API ID, API Hash, and GramJS String Session to the .env file: Edit the .env file and add your PostgreSQL connection URL, Telegram API ID, API Hash, and GramJS String Session:

    DATABASE_URL=your-postgresql-connection-url
    API_ID=your-telegram-api-id
    API_HASH=your-telegram-api-hash
    STRING_SESSION=your-gramjs-string-session

    You can generate the GramJS string session using telegramtools.com/string-session-generator.

  8. Set up Prisma:

    npx prisma db push
  9. Start the bot using nodemon:

    npm start

To-do & potential ideas

  • Markdown parsing for notes, filters, rules, welcomes
  • GramJS as utility
  • Pagination buttons for /notes so it wont cover entire screen
  • Refactor everything since there's A LOT of repeated code
  • Command prefixes !, ?
  • Autodelete "Only admins can use this command" type of messages
  • Hydration plugin (change every ctx and bot method)
  • Make use of all invitelink methods given by Telegram API, make a separate module for it
  • Pillow welcome where you fetch pfp of user and create a welcome card
  • Custom bot token (bot instances)
  • Moderator roles
  • Presets for security, settings and etc.
  • /shutup on | off command to make the bot shut up (owner only)

Bottom Notes

Feel free to clone, contribute and raise issues. You can even reach out to me on Telegram.

The project was rushed due to time constraints, so there might be some bugs and issues. Although, we're just getting started ;)

About

Telegram group management bot built using grammY + GramJS MTProto as utility.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •