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: Tue, 20 May 2025 20:41:02 GMT

> Note that there are thousands of dynamically created options for some games like MSFS2020. These will only appear whe the game/extension is running and the extension connected.

To see the full list of Triggers/Actions available checkout README_All_TRIGGERS.md

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:

postStartupActions()

At this point we should have any config/credentials loaded
Source:

sendRandomFact(from)

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

startupCheck()

waits for config and credentials files to set ready flag
Source: