Skip to content

Class: ChatConversation

structures.ChatConversation

Table of contents

Constructors

Properties

Methods

Constructors

constructor

+ new ChatConversation(data: ChatConversationOptions, client: default): ChatConversation

Parameters:

Name Type
data ChatConversationOptions
client default

Returns: ChatConversation

Defined in: structures/Chat.ts:61

Properties

client

client: default

Defined in: structures/Chat.ts:49


conversationTitle

conversationTitle: object

Type declaration:

Name Type
forViewer string
isDefaultTitle boolean

Defined in: structures/Chat.ts:56


hasUnreadMessages

hasUnreadMessages: boolean

Defined in: structures/Chat.ts:53


id

id: number

Defined in: structures/Chat.ts:50


initiator

initiator: PartialUser

Defined in: structures/Chat.ts:52


lastUpdated

lastUpdated: Date

Defined in: structures/Chat.ts:60


members

members: PartialUser[]

Defined in: structures/Chat.ts:54


title

title: string

Defined in: structures/Chat.ts:51


type

type: string

Defined in: structures/Chat.ts:55


universe

universe: null | PartialGameUniverse

Defined in: structures/Chat.ts:61

Methods

addUsers

addUsers(users: number[]): Promise<AddUsersToConversation>

Parameters:

Name Type
users number[]

Returns: Promise<AddUsersToConversation>

Defined in: structures/Chat.ts:99


getLatestMessages

getLatestMessages(amount?: number): Promise<ChatMessage[]>

Parameters:

Name Type Default value
amount number 100

Returns: Promise<ChatMessage[]>

Defined in: structures/Chat.ts:146


getMessages

getMessages(amount?: number, startId?: string): Promise<ChatMessage[]>

Parameters:

Name Type Default value
amount number 100
startId? string -

Returns: Promise<ChatMessage[]>

Defined in: structures/Chat.ts:90


getUnreadMessages

getUnreadMessages(amount?: number): Promise<ChatMessage[]>

Parameters:

Name Type Default value
amount number 100

Returns: Promise<ChatMessage[]>

Defined in: structures/Chat.ts:138


markMessageRead

markMessageRead(id: string): Promise<MarkMessageInConversationAsRead>

Parameters:

Name Type
id string

Returns: Promise<MarkMessageInConversationAsRead>

Defined in: structures/Chat.ts:115


markRead

markRead(): Promise<MarkConversationsAsSeen>

Returns: Promise<MarkConversationsAsSeen>

Defined in: structures/Chat.ts:123


removeUser

removeUser(userId: number): Promise<RemoveUserFromConversation>

Parameters:

Name Type
userId number

Returns: Promise<RemoveUserFromConversation>

Defined in: structures/Chat.ts:107


rename

rename(name: string): Promise<RenameGroupConversation>

Parameters:

Name Type
name string

Returns: Promise<RenameGroupConversation>

Defined in: structures/Chat.ts:130


resetUniverse

resetUniverse(): Promise<ResetConversationUniverse>

Returns: Promise<ResetConversationUniverse>

Defined in: structures/Chat.ts:154


sendGameLinkMessage

sendGameLinkMessage(options: SendGameLinkMessageOptions): Promise<ChatMessageSent>

Parameters:

Name Type
options SendGameLinkMessageOptions

Returns: Promise<ChatMessageSent>

Defined in: structures/Chat.ts:159


sendMessage

sendMessage(options: SendMessageOptions): Promise<ChatMessageSent>

Parameters:

Name Type
options SendMessageOptions

Returns: Promise<ChatMessageSent>

Defined in: structures/Chat.ts:164