Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Apeuriox/lazybot-renewal/llms.txt

Use this file to discover all available pages before exploring further.

Before you can use most Lazybot commands, you must bind your osu! account to your Discord or QQ identity. Lazybot stores the association in its database so it can look up your player ID automatically whenever you run a command without specifying a username. Two linking methods are supported: a quick username bind and a full OAuth2 flow that also stores an access token for authenticated API requests.

Linking Methods

Pass your osu! username as the argument to /link. Lazybot calls the osu! API v2 to resolve the username to a player ID, validates the account, and saves the binding.
/link username:Aloic
On success, Lazybot replies with a confirmation message such as [Lazybot] 成功绑定用户: Aloic. Passing oauth as the argument starts the OAuth2 authorisation flow. Lazybot generates a short-lived authorisation URL (valid for 10 minutes) and sends it to you. You open the URL, log in with your osu! account, and approve the requested scopes (identify public by default). The callback is handled by OsuOAuthController at the path configured in lazybot.oauth.redirect-uri (e.g. https://your-domain.example/oauth/osu/callback).
/link username:oauth
The bot replies ephemerally (visible only to you) with the authorisation link.
After you complete the browser flow, the callback page confirms the binding:
绑定成功 — 已验证并绑定 osu! 用户: <username>
The OAuth path is recommended for well-known players and any time you want Lazybot to make authenticated API requests on your behalf.
Lazybot enforces a bindability check before saving a username link. If your account’s global rank is 1000 or better and your country code is not CN, HK, TW, or MO, the bot will reject the manual username bind and ask you to use /link oauth instead to verify your identity. This prevents impersonation of top-ranked players.

Stored Data

When a link is saved, Lazybot stores the following fields in its UserBindingPO projection (which joins the lazybot_user, platform_identity, and osu_account tables):
FieldDescription
player_idosu! user ID (integer)
player_nameCached osu! username
default_modeDefault game mode (e.g. osu, taiko, fruits, mania)
default_subsetSub-ruleset preference (e.g. lazer ruleset variant)
preferred_panel_versionPreferred score panel visual version
platformqq or discord
platform_user_idYour platform-specific user ID
link_methodmanual (username bind) or oauth
serverBANCHO or STAR_MOON
OAuth credentials (access token, refresh token) are intentionally excluded from UserBindingPO and stored in a separate OsuOAuthCredential table.

Unlinking

Remove your binding with /unlink. Your Lazybot record is removed; you will need to run /link again to use account-dependent commands.
/unlink

Changing Your Default Game Mode

After linking, use /setmode to change which game mode Lazybot targets when you run commands without an explicit mode argument.
/setmode mode:1
The updated default mode is written to the default_mode field in the database and takes effect immediately.

Linking a Star Moon Private Server Account

If you play on the Star Moon (星月) private server, use /linksm to bind your Star Moon username alongside your Bancho account.
/linksm YourStarMoonName
Lazybot queries the Star Moon API to resolve the username to a player ID, then saves the binding with server = STAR_MOON. Commands in the Star Moon category (e.g. /bpseries on that server) will use this binding automatically.

Build docs developers (and LLMs) love