@my-swu/simulator-client / aiFormatEventMessage
Function: aiFormatEventMessage()
aiFormatEventMessage(
command):ClientMessage
Defined in: packages/ts-sdk/src/messages.ts:249
Wraps one host-authorized AI format-event command into a socket envelope.
This is only accepted for manual Player vs AI Trilogy ban/pick flows. The command is applied to the AI seat after the server validates the sender.
Example:
ts
import { aiFormatEventMessage } from '@my-swu/simulator-client'
// Submits an out-of-game choice on behalf of a manual-mode AI seat.
const clientMessage = aiFormatEventMessage({ type: 'banTrilogyDeck', deckIndex: 0 })
console.log(clientMessage.type)Parameters
command
Example:
ts
import { aiFormatEventMessage } from '@my-swu/simulator-client'
// Submits an out-of-game choice on behalf of a manual-mode AI seat.
const clientMessage = aiFormatEventMessage({ type: 'banTrilogyDeck', deckIndex: 0 })
console.log(clientMessage.type)Returns
Example
ts
import { aiFormatEventMessage } from '@my-swu/simulator-client'
const clientMessage = aiFormatEventMessage({ type: 'banTrilogyDeck', deckIndex: 1 })
console.log(clientMessage.type)