Skip to content

Documentation / @imvu/bot / BotConversation

Class: BotConversation ​

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

One IM conversation the bot is part of (the counterpart of a discord.js DM channel, or a group DM). Created when its first message arrives.

Constructors ​

Constructor ​

ts
new BotConversation(
   bot, 
   conversation, 
   limit, 
   maxQueue
): BotConversation;

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

Parameters ​

ParameterType
botBot
conversationConversation
limitRateLimit
maxQueuenumber

Returns ​

BotConversation

Properties ​

conversation ​

ts
conversation: Conversation;

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


type ​

ts
readonly type: "conversation";

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

Accessors ​

group ​

Get Signature ​

ts
get group(): boolean;

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

True for a conversation with more than one other person.

Returns ​

boolean


id ​

Get Signature ​

ts
get id(): string;

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

Returns ​

string


name ​

Get Signature ​

ts
get name(): string;

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

The other members' names, e.g. for logs.

Returns ​

string

Methods ​

_stop() ​

ts
_stop(): void;

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

Internal

Returns ​

void


participant() ​

ts
participant(): undefined;

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

Conversations have no participants in the room sense.

Returns ​

undefined


roleOf() ​

ts
roleOf(userId): Promise<Role>;

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

In IMs there are no room roles: bot admins are admin, everyone else everyone.

Parameters ​

ParameterType
userIdstring | number

Returns ​

Promise<Role>


say() ​

ts
say(text): Promise<void>;

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

Send a message to the conversation (rate limited per conversation and per account).

Parameters ​

ParameterType
textstring

Returns ​

Promise<void>


whisper() ​

ts
whisper(userId, text): Promise<void>;

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

Message one member privately: the conversation itself when it is one-to-one, a separate one-to-one IM when it is a group.

Parameters ​

ParameterType
userIdstring | number
textstring

Returns ​

Promise<void>

Released under the MIT License.