RandomFact

RandomFact

Contents

Outgoing channel : "RANDOMFACT_CHANNEL"

Description

Request a random fact and the result will be posted back.

Triggers/Actions

Triggers and actions below are updated when the automatic document generation system is run and only contain triggers actions relating to this specific extension.

Table last updated: Wed, 12 Mar 2025 05:38:02 GMT

Triggers

name trigger description
RandfactPoster trigger_RandomFact An interesting or amusing random fact was received

Actions

name trigger description
RandfactRequest action_RequestRandomFact Requests a random fact

"RandomFact" Extension Details...

Supplies random facts
Source:

Methods

SaveConfigToServer()

save our config to the server
Source:

SendSettingsWidgetSmall(extensionname)

Send our SettingsWidgetSmall to whoever requested it
Parameters:
Name Type Description
extensionname String
Source:

findtriggerByMessageType(messagetype)

Find a trigger via it's name
Parameters:
Name Type Description
messagetype string
Source:
Returns:
trigger

heartBeatCallback()

Sends heartbeat messages so other extensions can monitor status
Source:

initialise(app, host, port, heartbeat)

Starts the extension using the given data.
Parameters:
Name Type Description
app object:Express
host string
port number
heartbeat number
Source:

onDataCenterConnect(socket)

Called when websocket connects
Parameters:
Name Type Description
socket object
Source:

onDataCenterDisconnect(reason)

Disconnection message sent from the server
Parameters:
Name Type Description
reason String
Source:

onDataCenterMessage(server_packet)

Called when we receive a websocket message
Parameters:
Name Type Description
server_packet object
Source:

sendRandomFact(from)

sends a random fact to the extension
Parameters:
Name Type Description
from String
Source: