Skip to main content

@smol/gram@2.3.0
Built and signed on GitHub Actions

Tiny (smol) Telegram Bot API client library with TypeScript types

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a month ago (2.3.0)
type alias TgAnswerCallbackQueryParams

Parameters of TgApi.answerCallbackQuery method.

Properties

Unique identifier for the query to be answered

optional
text: string

Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters

If True, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false.

optional
url: string

URL that will be opened by the user's client. If you have created a Game and accepted the conditions via @BotFather, specify the URL that opens your game - note that this will only work if the query comes from a callback_game button. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.

The maximum amount of time in seconds that the result of the callback query may be cached client-side. Telegram apps will support caching starting in version 3.14. Defaults to 0.

Add Package

deno add jsr:@smol/gram

Import symbol

import { type TgAnswerCallbackQueryParams } from "@smol/gram";

---- OR ----

Import directly with a jsr specifier

import { type TgAnswerCallbackQueryParams } from "jsr:@smol/gram";

Add Package

npx jsr add @smol/gram

Import symbol

import { type TgAnswerCallbackQueryParams } from "@smol/gram";

Add Package

yarn dlx jsr add @smol/gram

Import symbol

import { type TgAnswerCallbackQueryParams } from "@smol/gram";

Add Package

pnpm dlx jsr add @smol/gram

Import symbol

import { type TgAnswerCallbackQueryParams } from "@smol/gram";

Add Package

bunx jsr add @smol/gram

Import symbol

import { type TgAnswerCallbackQueryParams } from "@smol/gram";