DiscordChat

Discord Chat

Contents

Setup

Outgoing channel : "DISCORD_CHAT"

Authorization fields

  • Name: DISCORD_TOKEN
  • Value: discord bot token

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
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

SaveChatMessagesToServerScheduler()

saves the discord chat buffer to the server
Source:

SaveConfigToServer()

save our config to the server
Source:

SaveDataToServer()

save our data to the server
Source:

SendCredentialsModal(extensionname)

Send our CredentialsModal to whoever requested it
Parameters:
Name Type Description
extensionname String
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:

connectToDiscord(credentials)

Connets to discord
Parameters:
Name Type Description
credentials object
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: