telegramx.js

Base

class

Base class for every data structure. Holds a non-enumerable reference to the client.

Declaration

declare abstract class Base<Data = unknown> 

Properties

clientproperty#
readonly client: Client;
rawproperty#
raw: Data;

The raw payload from the Telegram API. Every field is accessible here, snake_cased.

Methods

_patchmethod#
protected _patch(data: Data): this;
ParameterType
dataData
Returns this

Merge new raw data into this structure (used when an entity is re-fetched).

(constructor)constructor#
constructor(client: Client, data: Data);

Constructs a new instance of the Base class