member.work_time

GET · api v1

How long the member worked (on shift in OrcaBot reports) and was in game, for a period, and whether they are on shift now.

كم اشتغل العضو (في تقارير الدوام) وكم كان داخل اللعبة خلال فترة، وهل هو على رأس العمل الحين.

Parameters

NameTypeRequiredDescription
targetTargetrequiredWho to read about: { source = 7 } for an online player, { discord = "..." } or { code = "P-12" }.
factionstringrequiredThe in-game job name linked to the قطاع, e.g. "police".
periodstringoptional"today" | "week" | "month". Default "week".

Returns (res.data)

NameTypeDescription
work_secondsnumberTime on shift.
login_secondsnumberTime in game.
on_shiftbooleanHas an open shift right now.
shift_started_atstring|nilStart of the open shift.

Possible errors

Notes

Example

local res = exports.OrcaBot_V3:Get('member.work_time', { target = { source = src }, faction = 'police', period = 'week' })

Example output

{
  "ok": true,
  "data": {
    "period": "week",
    "work_seconds": 50400,
    "login_seconds": 61200,
    "on_shift": true,
    "shift_started_at": "2026-10-15T19:02:00Z"
  },
  "meta": {
    "action": "member.work_time",
    "method": "GET",
    "api": 1
  }
}