Class ForwardMessageContext

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

_client: Evogram
chat: undefined | ChatContext = ...

The chat from which the forwarded message was sent, if available.

date: undefined | 0 | Date = ...

The date and time at which the message was forwarded, if available.

user: undefined | UserContext = ...

The user who sent the forwarded message, if 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