DiscordChat

Discord Chat

Contents

About

Allows sending and receiving of discord messages.

Credentials

Follow the steps on the the StreamRoller main settings page for the extension

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: Thu, 24 Apr 2025 00:04:28 GMT

Triggers

name trigger description
DiscordMessageRecieved trigger_DiscordMessageReceived A message was posted to a discord chat room

Actions

name trigger description
DiscordPostMessage action_DiscordPostMessage Post a message to a discord channel

"DiscordChat" Extension Details...

Send received discord chat messages. Useful for mod messages during stream
as these can be displayed below chat on the liveportal
This is useful when you want mod messages not seen by chat.
Source:

Methods

DeleteCredentialsOnServer()

Sends Credentials to the server
Source:

SaveChatMessagesToServerScheduler()

saves the discord chat buffer to the server
Source:

SaveConfigToServer()

save our config to the server
Source:

SaveCredentialToServer(name, value)

Sends Credential to the server to be saved
Parameters:
Name Type Description
name string
value string
Source:

SaveDataToServer()

save our data to the server
Source:

SendSettingsWidgetLarge(extensionname)

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

SendSettingsWidgetSmall(extensionname)

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

(async) connectToDiscord()

Connects to discord/ will disconnect if extension is turned off
Source:

discordDisconnectHandler(message)

Called when discord disconnects
Parameters:
Name Type Description
message string
Source:

discordErrorHandler(message)

Handles discord error messages
Parameters:
Name Type Description
message string
Source:

discordMessageHandler(message)

Handles discord messages
Parameters:
Name Type Description
message string
Source:

discordReconnectHandler(message)

Handles discord reconnections
Parameters:
Name Type Description
message string
Source:

heartBeatCallback()

sends heartbeat status out so other extensions can monitor our status
Source:

initialise(app, host, port, heartbeat)

Starts the extension using the given data.
Parameters:
Name Type Description
app Express
host String
port Number
heartbeat Number
Source:

onDataCenterConnect()

called when a new server websocket connection is made
Source:

onDataCenterDisconnect(reason)

called when websocket connection to server goes down
Parameters:
Name Type Description
reason string
Source:

onDataCenterMessage(server_packet)

Called when a message is received on the websocket
Parameters:
Name Type Description
server_packet object
Source:

process_chat_data(message)

Sends out a discord message targetted for teh liveportal chat window
Parameters:
Name Type Description
message object
Deprecated:
  • this should be removed and extensions should check for the "trigger_DiscordMessageReceived" trigger instead
Source:

sendAlertMessageReceived(message)

sends a discord message alert trigger.
Parameters:
Name Type Description
message object
Source:

sendChatBuffer(toExtension)

Send our chat buffer to the extension
Parameters:
Name Type Description
toExtension String
Source: