Jump to content

Data API/Player Activity

From Bconomy Wiki

Data API · Types

playerActivity/online

[edit | edit source]

Returns game profiles with a connection, reported presence, or interaction signal in the past 90 minutes. A signal keeps a profile Active for 30 minutes, then Idle for 60 minutes before removal. Presence is independent of these sections. Available to everyone while the "Online players" Server Setting is enabled; otherwise moderators only.

Also returns the latest Discord community snapshot: linked profiles of members who are online in the Bconomy Discord, plus unlinked members as plain Discord usernames. Bots and offline or invisible members are excluded.

Request

{ "type": "playerActivity/online" }

Response

{
  capturedAt: string            // ISO 8601, shared membership snapshot time
  players: Array<PlayerDisplay & {
    status: "online" | "idle" | "offline"   // supplemental presence
    connectedAt: string | null   // ISO 8601, current connection session start
    lastSignalAt: string         // ISO 8601, latest objective signal
    lastSeenAt: string           // ISO 8601, last interaction, or lastSignalAt if unknown
  }>
  discord: {
    // Includes profiles also present in players; rendering deduplicates by BcID.
    players: Array<PlayerDisplay & { tier: number; rank: number }>
    guests: Array<{ discordId: string; displayName: string }> // Discord username
  }
}

interface PlayerDisplay {
  id: number
  name: string
  type: "main" | "ironman" | "hardcore"
  role: "developer" | "moderator" | "inactiveModerator" | null
  showCosmetics: boolean        // server-resolved normal cosmetic eligibility
  custom: {
    chatEmblemEmoji: string | null
    chatUsernameColor: string | null
    chatUsernameStyle: string | null
  }
}

connectedAt is the start of the player's current connection. It survives reloads and extra tabs, and resets once every tab has disconnected.

Generated from the Bconomy source documentation. Edits made on the wiki are overwritten on the next publish; ask the developers to change the source.