Class UpdateContext

Hierarchy

Constructors

Properties

_client: Evogram
_source: IUpdate
callback_query: undefined | object | Context<any> = ...

The context for the callback query in the update, if there is one.

channel_post: undefined | object | Context<any> = ...

The context for the channel post in the update, if there is one.

chat_join_request: undefined | object | Context<any> = ...

The context for the chat join request in the update, if there is one.

chat_member: undefined | object | Context<any> = ...

The context for the chat member in the update, if there is one.

chosen_inline_result: undefined | object | Context<any> = ...

The context for the chosen inline result in the update, if there is one.

edited_channel_post: undefined | object | Context<any> = ...

The context for the edited channel post in the update, if there is one.

edited_message: undefined | object | Context<any> = ...

The context for the edited message in the update, if there is one.

inline_query: undefined | object | Context<any> = ...

The context for the inline query in the update, if there is one.

message: undefined | object | Context<any> = ...

The context for the message in the update, if there is one.

my_chat_member: undefined | object | Context<any> = ...

The context for the my chat member in the update, if there is one.

name: undefined | IUpdateName = ...

The name of the type of the update, if it can be determined from the update object.

poll: undefined | object | Context<any> = ...

The context for the poll in the update, if there is one.

poll_answer: undefined | object | Context<any> = ...

The context for the poll answer in the update, if there is one.

pre_checkout_query: undefined | object | Context<any> = ...

The context for the pre checkout query in the update, if there is one.

shipping_query: undefined | object | Context<any> = ...

The context for the shipping query in the update, if there is one.

source: IUpdate = ...

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