Warns

Useful Items

In the documentation, warns will be replaced by this object:

{
  warnId: string;
  user: number;
  game: number;
  reason: string;
  mod: {
    roblox: number;
    discord: string;
  };
  data: {
    privacy: 'Public' | 'Restricted' | 'Private' | 'Database';
    proof: string;
  };
  createdAt: Date;
  updatedAt: Date;
  deletedAt: Date?;
}

data.proof will be a private Discord message link. It is reserved for the IRF Administration bot exclusively. warnId will always be a UUID v4.

Unlike the bans API, it is possible to include inactive warns. Read the documentation to learn more.

Adding a warn

POST /api/irf_warnings/add

Adds a warn to the database. Disabled internally. You will always receive 403 Forbidden when attempting this endpoint

Headers

This endpoint does not utilise headers

Body

This endpoint does not utilise a body

Response

{
  "success": false,
  "message": "You must add warnings using IRF Administration"
}

Checking warns

POST /api/irf_warnings/get

Checks for warnings matching the query in the body. Use force to include deleted results, as all entries are soft deleted instead of being permanently deleted.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

user

number

Roblox user ID to check

game

number

Roblox game ID to check

force

boolean

Include deleted warns on check (Default: false)

Response

{
  "success": true,
  "data": [warns]
}

Delete a warn

POST /api/irf_warnings/remove

Removes a warn from the database. Restricted internally.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description

warnId

string

Unique identifier for the warn

Response

{
  "success": true,
  "data": "User acknowledgement received"
}

Last updated