Mochi Sign in

Global protection

Mochi keeps a centrally curated Discord user registry in its own SQLite file, data/mochi-global-bans.sqlite. The feature is safe by default: every guild starts in disabled mode and must explicitly choose alert or enforce in the dashboard.

Modes

Guild-local exemptions are checked before enforcement. Mochi never automatically unbans a user when a global entry is revoked; revocation only cancels pending global enforcement work. Existing local bans are never changed automatically.

Storage

The registry lives in data/mochi-global-bans.sqlite next to the main database. Set GLOBAL_BANS_DATABASE_PATH to use another location. The file is created on first start. The bot reads it through the same snapshot and change feed that fills the local enforcement cache in mochi.sqlite. No external service or API token is needed.

Back up the registry file together with the main database. The global enforcement kill switch is GLOBAL_BANS_ENFORCEMENT_ENABLED=false.

Administrative mutations

Registry changes require an Idempotency-Key. Entries are proposed first and activated explicitly. Each change records the operator in the audit log table. The synchronization side only reads the snapshot and ordered change feed.

Owner-only registry dashboard

The Mochi dashboard also supports an optional owner-only Global registry page. It is available only to the Discord user IDs listed in GLOBAL_BANS_ADMIN_USER_IDS on that Mochi instance:

GLOBAL_BANS_ADMIN_USER_IDS=123456789012345678

These users also have full dashboard access to every server the bot is in, even without Manage Server permission in that server.

The browser talks only to Mochi's authenticated dashboard API. Registry entries are proposed first and then explicitly activated, rejected, revoked, or reopened. Every mutation uses an idempotency key, optimistic version checks, an operator Discord ID, and the registry audit feed.

The ordinary Global protection page remains guild-scoped. Guild owners and moderators can configure alert/enforce mode there, but do not receive central registry access unless their Discord ID is in the explicit allowlist.

Local-ban recommendations

The owner-only registry page includes a Recommended from this server panel. After selecting a manageable server in the dashboard guild picker, Mochi reads that server's Discord ban list (the bot needs the Ban Members permission), checks each user against the central registry, and marks only users with no existing record as eligible. Use suggestion copies the local user ID and ban reason into the proposal form; it never creates, activates, or otherwise mutates a global entry. Registry lookups are bounded and briefly cached, and the panel fails closed when the central registry cannot be verified.