Skip to content

Database

KourvA edited this page Aug 28, 2024 · 6 revisions

What data bot store for groups?

The bot stores specific data for each group to facilitate the execution of various commands and to enhance group management:

  • Language: The bot maintains the chosen response language for individual groups within a language file. This allows the bot to provide responses in different languages across various groups. The values stored in this file can be EN (for English), RU (for Russian), or FA (for Persian).

  • History: To offer statistics and information about each group, the bot stores specific data types in the history.json. If an incoming message in the group falls into one of these specified types (text, voice, animation, sticker, or photo), the bot increments the corresponding count in this file.

{
    "text": 0,
    "voice": 0,
    "animation": 0,
    "sticker": 0,
    "photo": 0
}
  • Members: The bot maintains a file to store details about group members. This data is crucial for functionalities such as user mentions. When a member leaves the group, the bot promptly removes the corresponding entry from this file. Storing members' details enables the bot to efficiently manage user interactions within the group.
{
    "1234567890": {
        "Firstname": "First name 1",
        "Lastname": "Last name 1",
        "Username": "Username 1",
        "messageCount": 124
    },
    "0987654321": {
        "Firstname": null,
        "Lastname": null,
        "Username": null,
        "messageCount": 0
    }
}
  • Warned: The bot incorporates a system for an unofficial 'warn' feature. Admins can issue warnings to users, and upon receiving a warning, the bot records the user's information in the warned.json file. Each user is allowed a maximum of 5 warnings, and surpassing this limit results in a 1-day mute. If a user is subsequently unmuted, the bot resets their warning status. This mechanism ensures effective moderation and user management within the group.
{
    "1234567890": {
        "Firstname": "User",
        "Lastname": null,
        "Username": null,
        "warnCount": 0
    }
}
  • VIP members: The bot maintains a file specifically for storing details about VIP members. VIP members are granted the privilege of sending locked media types in groups. When a member is promoted to VIP status, the bot adds their information to the vips.json file. This dedicated file ensures that VIP members receive special permissions for enhanced media sharing within the group.
{
    "1234567890": "Added By admin ADMIN1"
}
  • Co Admins: The bot maintains a list of members who are designated as bot admins. These individuals, though not Telegram group admins, possess the authority to command the bot. The list of bot admins is stored in coadmins.json by the bot to ensure seamless coordination and effective management of commands within the group.
{
    "1234567890": "Added By admin ADMIN1"
}
  • Locks: The bot stores media content lock settings in the locks.json file. This file serves as a reference for the bot to determine which types of media are currently locked. When media content is locked, the bot checks this file and proceeds to remove the specified locked media type from incoming messages. This mechanism ensures that the bot adheres to the configured media content restrictions within the group.
{
    "audio": true,
    "document": true,
    "animation": false,
    "game": true,
    "photo": true,
    "sticker": false,
    "video": true,
    "video_note": true,
    "voice": true,
    "contact": true,
    "location": true,
    "venue": true,
    "dice": false,
    "invoice": true,
    "successful_payment": true,
    "connected_website": true,
    "poll": true,
    "passport_data": true,
    "web_app_data": true,
    "forward": true
}

This is default media locks!

Prevous page: Anti Link | Next page: Information and Help Commands

Clone this wiki locally