Documentation / @imvu/bot / BotRoom
Class: BotRoom
Defined in: packages/bot/src/Bot.ts:147
One room the bot is in (the IMVU counterpart of a discord.js guild). Survives rejoins.
Constructors
Constructor
new BotRoom(
bot,
room,
session,
limit,
maxQueue
): BotRoom;Defined in: packages/bot/src/Bot.ts:153
Parameters
| Parameter | Type |
|---|---|
bot | Bot |
room | Room |
session | ChatSession |
limit | RateLimit |
maxQueue | number |
Returns
BotRoom
Properties
room
readonly room: Room;Defined in: packages/bot/src/Bot.ts:155
session
session: ChatSession;Defined in: packages/bot/src/Bot.ts:156
type
readonly type: "room";Defined in: packages/bot/src/Bot.ts:148
Accessors
id
Get Signature
get id(): string;Defined in: packages/bot/src/Bot.ts:164
Returns
string
name
Get Signature
get name(): string;Defined in: packages/bot/src/Bot.ts:168
Returns
string
participants
Get Signature
get participants(): ReadonlyMap<string, ChatParticipant>;Defined in: packages/bot/src/Bot.ts:173
Everyone present, by user id (the counterpart of guild.members.cache). A live view, not a copy.
Returns
ReadonlyMap<string, ChatParticipant>
Methods
_stop()
_stop(): void;Defined in: packages/bot/src/Bot.ts:210
Internal
Returns
void
boot()
boot(userId): Promise<void>;Defined in: packages/bot/src/Bot.ts:192
Boot a participant. Needs owner or moderator rights in the room.
Parameters
| Parameter | Type |
|---|---|
userId | string | number |
Returns
Promise<void>
leave()
leave(): Promise<void>;Defined in: packages/bot/src/Bot.ts:205
Returns
Promise<void>
participant()
participant(userId):
| ChatParticipant
| undefined;Defined in: packages/bot/src/Bot.ts:177
Parameters
| Parameter | Type |
|---|---|
userId | string | number |
Returns
| ChatParticipant | undefined
roleOf()
roleOf(userId): Promise<Role>;Defined in: packages/bot/src/Bot.ts:197
The highest role userId holds here.
Parameters
| Parameter | Type |
|---|---|
userId | string | number |
Returns
Promise<Role>
say()
say(text): Promise<void>;Defined in: packages/bot/src/Bot.ts:182
Say something in public chat (rate limited per room and per account).
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
Promise<void>
whisper()
whisper(userId, text): Promise<void>;Defined in: packages/bot/src/Bot.ts:187
Whisper one participant (rate limited).
Parameters
| Parameter | Type |
|---|---|
userId | string | number |
text | string |
Returns
Promise<void>