Skip to content

Class: Dialog ​

Extends: Base

Represents a dialog on Yurba

Constructors ​

Constructor ​

new Dialog(client, data): Dialog

Parameters ​

NameTypeDescription
clientClient
dataDialogModel

Returns ​

Dialog

Overrides ​

Base.constructor

Properties ​

author ​

author: null | ShortUserModel

The dialog's author


avatar ​

avatar: number

The dialog's avatar ID


country ​

country: number

The dialog's country


description ​

description: string

The dialog's description


dialogDude ​

dialogDude: null | ShortUserModel

The dialog dude (for private dialogs)


fire ​

fire: number

The dialog's fire count


id ​

id: number

The dialog's ID


lastMessage ​

lastMessage: MessageModel

The last message in the dialog


link: string

The dialog's link


member ​

member: boolean

Whether the current user is a member


memberManager ​

memberManager: DialogMemberManager

The dialog member manager


members ​

members: number

Number of members in the dialog


mute ​

mute: boolean

Whether the dialog is muted


name ​

name: string

The dialog's name


private ​

private: boolean

Whether the dialog is private


timestamp ​

timestamp: number

The dialog's creation timestamp


topic ​

topic: number

The dialog's topic


type ​

type: DialogType

The type of dialog


verify ​

verify: DialogVerify

The dialog's verification status

Accessors ​

displayName ​

Get Signature ​

get displayName(): string

The dialog's display name

Returns ​

string *? ***

isChannel ​

Get Signature ​

get isChannel(): boolean

Whether this is a channel dialog

Returns ​

boolean *? ***

isGroup ​

Get Signature ​

get isGroup(): boolean

Whether this is a group dialog

Returns ​

boolean *? ***

isPrivate ​

Get Signature ​

get isPrivate(): boolean

Whether this is a private dialog

Returns ​

boolean *? ***

isVerified ​

Get Signature ​

get isVerified(): boolean

Whether the dialog is verified

Returns ​

boolean *? ***

url ​

Get Signature ​

get url(): string

The URL to the dialog

Returns ​

string

Methods ​

_clone() ​

_clone(): Dialog

Internal

Creates a clone of this dialog

Returns ​

Dialog

Overrides ​

Base._clone


_patch() ​

_patch(data): this

Internal

Updates the dialog with new data

Parameters ​

NameTypeDescription
dataPartial<DialogModel>The new dialog data

Returns ​

this

Overrides ​

Base._patch


toString() ​

toString(): string

Returns a string representation of an object.

Returns ​

string *? ***

valueOf() ​

valueOf(): any

Returns ​

any

Inherited from ​

Base.valueOf