Skip to content

Documentation / @imvu/bot / BotMessage

Interface: BotMessage ​

Defined in: packages/bot/src/Bot.ts:60

A chat line the bot received, with its author resolved.

Properties ​

action ​

ts
action: boolean;

Defined in: packages/bot/src/Bot.ts:68

/me … narration.


author ​

ts
author: User;

Defined in: packages/bot/src/Bot.ts:63

The sender. Resolved from the cache (participant reads embed users), fetched only on a miss.


participant ​

ts
participant: ChatParticipant | null;

Defined in: packages/bot/src/Bot.ts:65

The sender's presence in the room; null for IMs, and when not known yet.


raw ​

ts
raw: 
  | ChatMessage
  | ConversationMessage;

Defined in: packages/bot/src/Bot.ts:73

The underlying room chat line or IM.


receivedAt ​

ts
receivedAt: Date;

Defined in: packages/bot/src/Bot.ts:71


source ​

ts
source: MessageSource;

Defined in: packages/bot/src/Bot.ts:66


text ​

ts
text: string;

Defined in: packages/bot/src/Bot.ts:61


whisper ​

ts
whisper: boolean;

Defined in: packages/bot/src/Bot.ts:70

Whispered to the bot rather than said publicly. Always false for IMs.

Methods ​

reply() ​

ts
reply(text): Promise<void>;

Defined in: packages/bot/src/Bot.ts:75

Answer in kind: a whisper gets a whisper back, public chat a public reply.

Parameters ​

ParameterType
textstring

Returns ​

Promise<void>

Released under the MIT License.