Skip to content

GramIO API Reference / @gramio/contexts/dist / SharedUser

Class: SharedUser

Defined in: contexts/index.d.ts:2907

This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.

Constructors

Constructor

new SharedUser(payload): SharedUser

Defined in: contexts/index.d.ts:2909

Parameters

ParameterType
payloadTelegramSharedUser

Returns

SharedUser

Properties

PropertyTypeDefined in
payloadTelegramSharedUsercontexts/index.d.ts:2908

Accessors

[toStringTag]

Get Signature

get [toStringTag](): string

Defined in: contexts/index.d.ts:2911

MDN

Returns

string


firstName

Get Signature

get firstName(): string

Defined in: contexts/index.d.ts:2915

First name of the user, if the name was requested by the bot

Returns

string


lastName

Get Signature

get lastName(): string

Defined in: contexts/index.d.ts:2917

Last name of the user, if the name was requested by the bot

Returns

string


photo

Get Signature

get photo(): PhotoSize[]

Defined in: contexts/index.d.ts:2921

Available sizes of the chat photo, if the photo was requested by the bot

Returns

PhotoSize[]


userId

Get Signature

get userId(): number

Defined in: contexts/index.d.ts:2913

Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.

Returns

number


username

Get Signature

get username(): string

Defined in: contexts/index.d.ts:2919

Username of the user, if the username was requested by the bot

Returns

string