telegramx.js

User

class

extends Base<T.User>

A Telegram user or bot.

Declaration

declare class User extends Base<T.User> 

Properties

firstNameproperty#
get firstName(): string;
fullNameproperty#
get fullName(): string;

The user's first and last name joined together.

idproperty#
get id(): number;

Unique identifier for this user or bot.

isBotproperty#
get isBot(): boolean;

Whether this user is a bot.

isPremiumproperty#
get isPremium(): boolean;

Whether this user is a Telegram Premium user.

get languageCode(): string | undefined;
lastNameproperty#
get lastName(): string | undefined;
usernameproperty#
get username(): string | undefined;

Methods

fetchProfilePhotos(limit?: number, offset?: number): Promise<T.UserProfilePhotos>;
ParameterType
limit?number
offset?number
Returns Promise<T.UserProfilePhotos>

Fetch this user's profile photos.

toStringmethod#
toString(): string;
Returns string