ZiyueBot Documentation

website·Indexed 31 days ago

https://docs.ziyuebot.cn

Documentation for ZiyueBot, a multi-platform bot for QQ and Discord. Features include Harmony Commands (cross-platform), General Commands, and specialized systems like Driftbottles (漂流云瓶) and Straitbottles (海峡云瓶). Includes technical guides on management commands, privilege systems, blacklists, and sponsor-exclusive features such as the Draw command.

Tokens
9.8K
Snippets
44
Records
103
Agent score
52%

What's inside ZiyueBot

  1. Overview of the Stargazer system for Driftbottles

    The Stargazer (云瓶星标) system is a collection mechanism used to distinguish and track the quality of Driftbottles (云瓶). Users can 'star' specific bottles to add them to their personal stargazer list for easy retrieval and organization.
  2. Understand the Drift Bottle censorship workflow

    The Censorship mechanism is an external process managed by a third-party platform to maintain the quality of the Drift Bottle ecosystem. When a user throws a Drift Bottle, the content is first written to the driftbottles_queue database table. Only after passing the external audit is the content moved/written into the driftbottles database table for public visibility.
  3. Understand Harmony Commands in Ziyue Bot

    Harmony Commands (鸿蒙命令) refer to a specific set of commands in Ziyue Bot that share a single codebase across both QQ and Discord platforms, ensuring consistent functionality across different chat environments.
  4. Understand Aprilbottles (愚人云瓶) behavior and data structure

    Aprilbottles is a specialized database table used exclusively during April Fools' Day. When a user invokes the 'Pick Drift Bottle' (捞云瓶) command, there is a 50% probability that the system will query the aprilbottles table instead of the standard drift bottle database.

    Key characteristics include:

    • Content: Generally contains 'QQ group essence messages' from before the Ziyue machine's appearance on March 10, 2024.
    • Display: These bottles are displayed as 'negative numbered bottles' (e.g., -{ID}) to the user, regardless of whether the actual ID in the database is positive.
    • Data Entry: Records can only be added to this table manually.
  5. Use Driftbottle commands in Ziyue Bot

    The Driftbottle (漂流瓶/云瓶) feature provides a set of commands for sending and receiving virtual bottles. Due to the command parsing mechanism of Ziyue Bot, Driftbottle commands must be sent as standalone messages and cannot be used as replies to other messages.

    Available commands include:

    • Throw a bottle (扔云瓶)
    • Pick up a bottle (捞云瓶)
    • Remove a bottle (删除云瓶)
    • List my bottles (查看我的云瓶)
  6. Manage user restrictions using Ziyue Bot blacklists

    Ziyue Bot uses a blacklist system to revoke a user's right to call specific commands or all commands. When a user attempts to call a command, the bot checks the blacklists table in the database. If a match is found, the request is rejected and a ban notification is returned. Blacklists are technically permanent as they do not store a duration, but they can be revoked by deleting the corresponding record from the database. Blacklist records must be added manually to the database.
  7. Get ZiYue Bot information using the /about command

    The /about command is a Harmony command used to retrieve general information about the ZiYue Bot, including its developer, programming language (C#), supported platforms (QQ and Discord), and links to the official tutorial, open-source repository, and online documentation. This command takes no parameters and has no rate limits.
    /about
  8. Understand Management Command behavior and permissions

    Management Commands are a specialized category of commands in ZiyueBot. Unlike standard commands, they are hidden from the general help command list to prevent clutter and unauthorized access. However, specific help information for these commands can still be queried. Because they are intended for administrative tasks, they typically have strict permission requirements.
  9. Distinguish between Ziyue (Developer) and Ziyue Machine (Bot)

    It is critical to distinguish between the developer and the software project:

    • Ziyue (子悦): Refers exclusively to the developer of the software.
    • Ziyue Machine (子悦机器): Refers to the open-source robot project developed by Ziyue.

    Users must refer to the bot as "Ziyue Machine" and should not abbreviate it as "Ziyue," as that term is reserved for the developer.

  10. Understand General Command platform availability in ZiyueBot

    General Commands in ZiyueBot are commands that may use different code implementations for QQ and Discord, or may be exclusive to one of these platforms. If a command is not available on the current platform, it is treated as non-existent: it will not appear in the help menu and will trigger a 'Command not found' (命令未找到) message when called.
  11. Use Straitbottle for cross-platform message exchange

    Straitbottle (海峡云瓶) is a set of commands that enables a 'drift bottle' mechanism between QQ and Discord. A bottle thrown from QQ can only be picked up by a user on Discord, and vice versa. Each bottle can be picked up only once. Due to the command parsing mechanism of the Ziyue bot, these commands must be sent as new messages and cannot be used as replies to other messages.
  12. Play Russian Roulette (Revolver) in ZiyueBot

    The Russian Roulette (Revolver) command set simulates a gambling game where a single 'bullet' is randomly placed in one of six chambers of a revolver. The game can only be played within group chats.

    Game Mechanics:

    1. A game must be initiated using the 'Start Russian Roulette' command.
    2. There are 6 total shooting opportunities (chambers).
    3. Players can choose to shoot, rotate the cylinder, or reset the current chamber position.
    4. The game ends when the 6th chamber is fired or when a player is hit by the 'bullet'.