Lazybot ships with a lightweight permission system that allows commands to be disabled at different granularities without redeploying the bot. TheDocumentation 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.
PermissionChainHandler (the first link in the command chain, running at @Order(0)) queries PermissionService for each incoming command and halts execution with a user-friendly error message if a restriction is in effect. Administrators can bypass these checks entirely by being present in the hardcoded bypass list.
Permission Scopes
| Scope | Key | Target ID | Effect when disabled |
|---|---|---|---|
CHANNEL | "CHANNEL" | QQ group ID | Command is refused in the specific group channel with the message “此指令已在本群禁用” |
GLOBAL | "GLOBAL" | 0 (fixed) | Command is refused everywhere with the message “此指令已被开发者禁用” |
USER | "USER" | Sender’s user ID | Per-user restriction (present in the source but currently commented out — not enforced) |
- CHANNEL check first — a per-group disable stops execution before the global check is even reached.
- GLOBAL check second — a developer-level disable applies bot-wide.
- USER check — the code is present as commented-out lines in
PermissionChainHandlerand is not active in the current build.
PermissionService.checkPermission(type, id, command, version) returns true if the command is permitted and false if it is disabled. An unexpected exception from the permission service itself is also treated as a hard stop — the chain is halted with the message “权限检查失败,已跳过执行” to prevent accidental permission bypass due to database errors.
The /verify Command
The /verify command (VerifyCommand, mapped to "verify") is an admin-facing tool for verifying user identity records. It is implemented in command/manage/VerifyCommand.java and delegates to ManageService.verify(VerifyParameter).
- QQ
VerifyCommand does not carry a @LazybotRateLimit annotation, it is not rate-limited by RateLimitHandler. However, any permission rules configured for the "verify" command via PermissionService still apply unless the caller is in the adminBypass list.