member.warnings

GET · api v1

Active warnings in a قطاع, the current warning level and how many are allowed before termination.

الإنذارات الفعّالة في القطاع، ومستوى الإنذار الحالي، وكم إنذار مسموح قبل الفصل.

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".

Returns (res.data)

NameTypeDescription
active_countnumberLive warnings.
leveltable|nil{ index, name } of the reached level.
max_before_terminationnumberThe قطاع limit.
warningstable[]{ id, reason, granted_at, expires_at, granted_by_name }

Possible errors

Notes

Example

local res = exports.OrcaBot_V3:Get('member.warnings', { target = { code = 'P-12' }, faction = 'police' })

Example output

{
  "ok": true,
  "data": {
    "active_count": 1,
    "level": {
      "index": 1,
      "name": "المستوى الأول"
    },
    "max_before_termination": 3,
    "warnings": [
      {
        "id": 881,
        "reason": "تأخر عن الدوام",
        "granted_at": "2026-10-10T19:00:00Z",
        "expires_at": "2026-11-10T19:00:00Z",
        "granted_by_name": "سعود العنزي"
      }
    ]
  },
  "meta": {
    "action": "member.warnings",
    "method": "GET",
    "api": 1
  }
}