Class ContactContext

Hierarchy

Constructors

Properties

_client: Evogram
_source: IContact
country: {
    code: string;
    country: undefined | string;
}[] = ...

An array of objects containing information about the countries associated with this contact's phone number. *

Returns

An array of objects containing country and code information.

vCard: undefined | IVCard = ...

The contact's vCard information, parsed from the vcard string if it exists. *

Returns

An object representing the contact's vCard information, or undefined if not available.

Accessors

Methods

  • Converts the source object to a context object of a given type.

    Example

    client.updates.on("message", message => {
    const user = message.user.toContext<CustomUserContext>();
    // Now user works correctly with your context
    })

    Type Parameters

    • TContext extends object

      Generic type parameter for the context object.

    Returns TContext

    The context object.

Generated using TypeDoc