For the complete documentation index, see llms.txt. This page is also available as Markdown.

Firearm Endpoints

Firearm Endpoints

Raw list of firearm endpoints:

  • GET /firearm/info

  • GET /firearm/list

  • POST /firearm/create

  • PATCH /firearm/edit

  • DELETE /firearm/delete

List of firearm endpoint methods

If you see the empty "firearm" array or firearm: [] This is simply just the placeholder for the firearm object structure, Which looks like this in all major requests: (Inside the array)

{            
   id: "ID",
   userID: "USER_ID",
   userName: "USER_NAME",
   civilianID: "CIV_ID",
   civilianName: "CIV_NAME",
   stolen: "STOLEN",
   serialNumber: "SERIAL_NUMBER",
   model: "MODEL",
   timestamp: "TIMESTAMP"
}

GET https://roleplaybot.xyz/api/firearm/info

Searches for a registered firearm, Returns information if it exists.

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

serialNumber*

SERIAL_NUMBER

Firearm Serial Number (String) (# ID)

Firearm found and information displayed

Invalid or missing field

Accessing a guild that is not authorized apart of your API key

List Firearms

GET https://roleplaybot.xyz/api/firearm/list

Provides every registered vehicle inside the guild

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Accessing a guild that is not authorized apart of your API key

One or more firearms found and listed

There is no registered firearms inside the guild

Create Firearm

POST https://roleplaybot.xyz/api/firearm/create

Registers a firearm to a civilian character

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

name*

CIV_NAME

Civilian Name (String)

model*

MODEL

Firearm Model (String)

color*

COLOR

Firearm Color (String)

Accessing a guild that is not authorized apart of your API key

Invalid or missing field

Registered vehicle

Database error, Unable to register firearm inside database. Contact RoleplayBot support

Edit Firearm

PATCH https://roleplaybot.xyz/api/firearm/edit

Edits a firearm with the specified field and value Valid Fields: - color (Value: String) - stole (Value: Boolean)

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

name*

CIV_NAME

Civilian Name (String)

field*

FIELD

Field to edit (Must be listed in valid fields)

value*

VALUE

Value to set (Must match allocated field)

Accessing a guild that is not authorized apart of your API key

Firearm successfully edited

Database error, Unable to edit firearm inside database. Contact RoleplayBot support

Delete Vehicle

DELETE https://roleplaybot.xyz/api/firearm/delete

Deletes a firearm using the serial number

Headers

Name
Type
Description

Authorization*

API_KEY

API Authorization Key

Guild*

GUILD_ID

Discord Guild ID

Request Body

Name
Type
Description

serialNumber*

SERIAL_NUMBER

Firearm Serial Number (String) (# ID)

Successfully deleted firearm

Database error, Unable to delete firearm inside database. Contact RoleplayBot support

Last updated