LogoAntiRaid

@antiraid-ext/events/antiraid/GetSettings

API reference for @antiraid-ext/events/antiraid/GetSettings

@antiraid-ext/events/antiraid/GetSettings

Types

Result

Raw Type
type Result = {
	isGetSettings: true,

	data: {settings.Setting}
} | {
	isGetSettings: false
}

Union with variants:

Variant 1
PropTypeDescription
isGetSettings
-
data
-
Variant 2
PropTypeDescription
isGetSettings
-

Functions

onGetSettings

Run a callback when the `AntiRaid.GetSettings` event is triggered (a user requests the list of settings from the server).

Function Signature
--- Run a callback when the \`AntiRaid.GetSettings\` event is triggered (a user requests the list of settings from the server).
--- @param event The event to listen for.
--- @param callback The callback to run when the event is triggered. The callback will receive the \`events.GetSettingsEvent\` data and is expected to return a list of settings to be displayed to the user
--- @return Result The result of the operation, containing a list of settings if successful
function onGetSettings(event: Primitives.Event, callback: (data: events.GetSettingsEvent) -> {settings.Setting}) -> Result end

Arguments

event

The event to listen for.

Primitives.Event

callback

The callback to run when the event is triggered. The callback will receive the `events.GetSettingsEvent` data and is expected to return a list of settings to be displayed to the user

Function Signature
callback: (data: events.GetSettingsEvent) -> {settings.Setting}

Arguments

data

events.GetSettingsEvent

Returns

Result

The result of the operation, containing a list of settings if successful

{settings.Setting}

Returns

Result

The result of the operation, containing a list of settings if successful

Result

Last updated on