Skip to main content

View as Markdown · AI documentation index

Type Alias: MessengerHelpers

MessengerHelpers = object

Defined in: scripts/types.ts:215

Toolbox handed to a defineScript builder.

Properties​

choice()​

choice: (id, options) => ChoiceBeatInput

Defined in: scripts/types.ts:249

Blocks until the player picks a reply.

Parameters​

id​

string

options​

ChoiceOption[]

Returns​

ChoiceBeatInput


from()​

from: (sender) => SenderScope

Defined in: scripts/types.ts:226

Scopes the following builders to a sender.

Parameters​

sender​

Contact | string

Returns​

SenderScope


image()​

image: (src, options?) => MediaItemInput

Defined in: scripts/types.ts:220

Builds an image item for a media message.

Parameters​

src​

string

options?​

MediaItemOptions

Returns​

MediaItemInput


player​

player: SenderScope

Defined in: scripts/types.ts:229

Builders scoped to the player.


system()​

system: (key, params?, options?) => SystemBeatInput

Defined in: scripts/types.ts:232

An in-fiction system notice such as a member joining.

Parameters​

key​

string

params?​

Params

options?​

Pick<MessageOptions, "id">

Returns​

SystemBeatInput


t()​

t: (key, params?) => I18nText

Defined in: scripts/types.ts:217

Marks a translation key. See t.

Parameters​

key​

string

params?​

Params

Returns​

I18nText


typing()​

typing: (sender, ms, options?) => TypingBeatInput

Defined in: scripts/types.ts:239

Shows a typing indicator, then delivers the next beat.

Parameters​

sender​

Contact | string

ms​

number

options?​

Pick<MessageOptions, "id">

Returns​

TypingBeatInput


video()​

video: (src, options?) => MediaItemInput

Defined in: scripts/types.ts:223

Builds a video item for a media message.

Parameters​

src​

string

options?​

MediaItemOptions

Returns​

MediaItemInput


wait()​

wait: (ms, options?) => WaitBeatInput

Defined in: scripts/types.ts:246

Delays the next beat by ms of game time.

Parameters​

ms​

number

options?​

Pick<MessageOptions, "id">

Returns​

WaitBeatInput


when()​

when: <T>(condition, value) => T | undefined

Defined in: scripts/types.ts:252

Returns value when condition is truthy, otherwise undefined.

Type Parameters​

T​

T

Parameters​

condition​

unknown

value​

T | () => T

Returns​

T | undefined