Welshman Docs / @welshman/app / Command
Class: Command
Defined in: command.ts:12
An event paired with the relays it's meant for, without committing to how it gets published. Plugin mutation methods (create/update/etc.) build the event and return a Command instead of publishing it directly, so the caller decides: publish() sends it through the normal Publisher pipeline, and publishToRelays(urls) targets a specific set of relays.
Constructors
Constructor
new Command(
app,event,relays):Command
Defined in: command.ts:13
Parameters
app
event
relays
string[]
Returns
Command
Properties
app
readonlyapp:IApp
Defined in: command.ts:14
event
readonlyevent:EventTemplate
Defined in: command.ts:15
relays
readonlyrelays:string[]
Defined in: command.ts:16
Methods
publish()
publish():
Publication
Defined in: command.ts:19
Returns
publishToRelays()
publishToRelays(
urls):Publication
Defined in: command.ts:21
Parameters
urls
string[]