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
new BotConversation(
bot,
conversation,
limit,
maxQueue
): BotConversation;Defined in: packages/bot/src/Bot.ts:241
Parameters
| Parameter | Type |
|---|---|
bot | Bot |
conversation | Conversation |
limit | RateLimit |
maxQueue | number |
Returns
BotConversation
Properties
conversation
conversation: Conversation;Defined in: packages/bot/src/Bot.ts:243
type
readonly type: "conversation";Defined in: packages/bot/src/Bot.ts:238
Accessors
group
Get Signature
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
get id(): string;Defined in: packages/bot/src/Bot.ts:251
Returns
string
name
Get Signature
get name(): string;Defined in: packages/bot/src/Bot.ts:256
The other members' names, e.g. for logs.
Returns
string
Methods
_stop()
_stop(): void;Defined in: packages/bot/src/Bot.ts:293
Internal
Returns
void
participant()
participant(): undefined;Defined in: packages/bot/src/Bot.ts:288
Conversations have no participants in the room sense.
Returns
undefined
roleOf()
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
| Parameter | Type |
|---|---|
userId | string | number |
Returns
Promise<Role>
say()
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
| Parameter | Type |
|---|---|
text | string |
Returns
Promise<void>
whisper()
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
| Parameter | Type |
|---|---|
userId | string | number |
text | string |
Returns
Promise<void>