Add startup scheme
This commit is contained in:
@@ -573,6 +573,15 @@ async def do_spam_jail(user_id: int) -> None:
|
||||
# ---------------------------------------------------------------------------
|
||||
# Public helpers
|
||||
# ---------------------------------------------------------------------------
|
||||
async def missing_schema_fields() -> list[str]:
|
||||
"""Compare the live PocketBase collection schema against every field the
|
||||
bot persists. PocketBase silently drops writes to undeclared fields, so
|
||||
any name returned here means broken features without error messages."""
|
||||
live = await pb_client.get_collection_fields()
|
||||
expected = set(_default_user()) | {"user_id"}
|
||||
return sorted(expected - live)
|
||||
|
||||
|
||||
async def get_all_users_raw() -> dict[str, "UserData"]:
|
||||
"""Return a snapshot of all user records."""
|
||||
records = await pb_client.list_all_records()
|
||||
|
||||
Reference in New Issue
Block a user