Class CallbackQueryContext

Hierarchy

Constructors

Properties

_client: Evogram
client: Evogram = ...
message: undefined | MessageContext = ...

The message context associated with the callback query, if available.

user: UserContext = ...

The user who triggered the callback query.

Accessors

  • get gameShortName(): undefined | string
  • The short name of the game to be returned, if this callback query is from a game message.

    Returns undefined | string

  • get inlineMessageID(): undefined | string
  • The ID of the inline message that was sent with the button that triggered the callback query, if available.

    Returns undefined | string

Methods

  • Answers the callback query with the specified parameters.

    Parameters

    Returns Promise<true>

    A Promise that resolves with the result of the API call to answer the callback query.

  • 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