Charges
Here, you'll find key exports for managing charges. These exports allow you to create, update and delete charges as needed.
Type
type Charge = {
id: number,
name: string,
description: string,
jail?: number,
fine?: number,
createdAt: string,
tag: {
identifier: string,
label: string,
color: string
}
}
Exports
Search for a charge
exports['redutzu-mdt']:SearchCharge(id: number) // ChargeType | null
Create a new charge
exports['redutzu-mdt']:CreateCharge({
name = 'Charge name',
description = 'Charge description',
jail = 5, -- this is optional
fine = 1000, -- this is optional
tag = 'tag identifier'
}) -- number (id)
Update a charge
-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateCharge(id, { name = 'New name', jail = 10 }) -- boolean
Delete a charge
-- It returns a boolean (if it was successfully deleted)
exports['redutzu-mdt']:DeleteCharge(id: number) // boolean
Last updated
Was this helpful?