Serein Documentation

website·Indexed 29 days ago

https://sereindev.github.io

Documentation for Serein v2.1.0, a multi-server management tool that allows users to control multiple servers from a single interface. Features include a web console, a powerful plugin system for .NET developers, Cron-based scheduled tasks, regex matching for server I/O and chat messages, and a comprehensive Web API for server and setting management.

Tokens
44.3K
Snippets
297
Records
402
Agent score
75%

What's inside Serein

  1. Overview of Serein Game Server Management Tool

    Serein is an automated management tool specifically designed for game servers. It provides capabilities for unified management of multiple servers, cross-server communication, remote control via a web interface, and extensibility through a plugin system that allows the panel to function as a multi-purpose bot.
  2. Overview of Serein Connection functionality

    The connection feature is a core component of Serein that enables communication between Serein and chat platform bot applications. It allows Serein to receive messages from a chat platform and forward them to plugins or processing logic, as well as send messages back to the platform. Serein supports the OneBot protocol (V11 and V12) and the Satori protocol.
  3. Overview of Serein Plugin Capabilities

    Serein's plugin system allows for extensive functional extensions. Key use cases include:

    • Data Analysis: Tracking player statistics (online time, activity), generating server operation reports, and visualizing performance metrics.
    • External Integration: Connecting to databases (MySQL, PostgreSQL, MongoDB), integrating third-party APIs/Web services, and managing files (automated backups, log analysis).
  4. Overview of Serein Game Server Management Tool

    Serein is an automation management tool designed for game servers. It allows developers and administrators to manage multiple servers (including Java Edition, Bedrock Edition, and Terraria) from a single interface. Key capabilities include real-time performance monitoring (CPU usage and player counts), cross-platform connectivity with social platforms like QQ and Discord, and a web-based remote console for server administration without additional software.
  5. Retrieve server details by ID

    Use the GET /servers/{id} endpoint to retrieve detailed information about a specific server. The request requires a server ID as a path parameter. A successful request returns a 200 status code with a Server object in the response body. If the server is not found, the API returns a 404 status code.
    GET /servers/{id} HTTP/1.1
  6. Get specific user info in a group using serein.getUserInfo

    Use serein.getUserInfo to retrieve detailed information about a specific user within a group.
    const info = serein.getUserInfo(114514, 1919810);
    
    interface UserInfo {
        id: number
        card: string
        nickname: string
        role: number
        gameId: string
    }
  7. Retrieve the list of loaded plugins

    Use serein.getPluginList() to get an array of PluginInfo objects containing details about loaded plugins such as namespace, version, author, and event list. Because plugins may still be loading when this is called, it is recommended to wrap this call in a setTimeout().
    // PluginInfo structure
    interface Plugin {
      readonly namespace: string;
      readonly name?: string;
      readonly version?: string;
      readonly author?: string;
      readonly description?: string;
      readonly file: string;
      readonly preLoadConfig: PreLoadConfig;
      readonly eventList: string[];
      readonly wsclients: WSClient[];
      readonly available: boolean;
    }
  8. Serein JS Plugin Environment and Standards

    Serein JS plugins (v1.x) use the ECMAScript 2022 standard, powered by the Jint engine. Developers should be aware of the following stability constraints: executing statements at an extremely high frequency or causing infinite recursion (stack overflow) will lead to Serein becoming unresponsive or crashing.
  9. Understand Serein Permission Groups

    Serein features a built-in permission management system (inspired by LuckPerms and GroupManager) that allows precise control over user access to plugin functions using hierarchical permission nodes and groups.
  10. Retrieve a list of sound devices

    Use the GET /hardware/sound-devices endpoint to retrieve information about the sound devices available on the system. The response returns an array of device objects containing the caption, description, manufacturer, name, and product name of each device.
    GET /hardware/sound-devices HTTP/1.1
  11. Use Serein debug output for development

    Serein's debug mode provides a window for developers to monitor function execution and variable changes. All debug logs are automatically persisted to the logs/debug directory. This feature is intended for development and troubleshooting and is generally not recommended for standard users unless requested by a developer.