StatusPageChecker

The status page checker. Inspired by @almostSouji

Constructor

new StatusPageChecker(options)

The constructor of the status page checker class.

Parameters:
NameTypeDescription
optionsStatusPageCheckerOptions

The options of the status page checker

Extends

  • EventEmitter

Members

cache :Collection.<String, IncidentData>

The cache with all page incidents

Type:

options :StatusPageCheckerOptions

The options of the status page checker.

webhook :WebhookClient

The webhook client.

Type:
  • WebhookClient

Methods

(async) check() → {Promise.<(Boolean|DisGroupDevError)>}

The check function

Returns:
Type: 
Promise.<(Boolean|DisGroupDevError)>

updateIncident(incident, messageIdnullable) → {Promise.<(Boolean|DisGroupDevError)>}

Updates an incident

Parameters:
NameTypeAttributesDefaultDescription
incidentIncidentDataRaw

The raw data of the incident

messageIdString<nullable>
null

The id of the webhook message

Returns:
Type: 
Promise.<(Boolean|DisGroupDevError)>

Events

incidentCheck

Emitted when a check has started.

incidentCreate

Emitted when a new incident has been found

Parameters:
NameTypeDescription
incidentDataIncidentData

incidentUpdate

Emitted when an incident has been updated

Parameters:
NameTypeDescription
incidentDataIncidentData