ChannelRelay
in package
FinalYes
Two-way bridge between the default agent and one Discord channel:
- every
$pollIntervalseconds,observethe agent and forward the world dashboard when there is a NEW world-chat message or a NEW threat (alerts linger for many ticks, so they are de-duplicated by theirtick); - a plain message typed in that channel is relayed into the world as a
sayintent.
Tags
Table of Contents
Properties
- $channelId : string
- $nha : NHA
- $pollInterval : float
- $seenMessageCount : int
- $seenThreatTick : int
- $state : StateStore
Methods
- __construct() : mixed
- start() : void
Properties
$channelId read-only
private
string
$channelId
$nha read-only
private
NHA
$nha
$pollInterval read-only
private
float
$pollInterval
$seenMessageCount
private
int
$seenMessageCount
= 0
$seenThreatTick
private
int
$seenThreatTick
= 0
$state read-only
private
StateStore
$state
Methods
__construct()
public
__construct(NHA $nha, StateStore $state, string $channelId, float $pollInterval) : mixed
Parameters
- $nha : NHA
- $state : StateStore
- $channelId : string
- $pollInterval : float
start()
public
start() : void