Skip to main content

Built and signed on GitHub Actions

Framework-agnostic Telegram bot keyboard builder with many cool features!

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
3 months ago (1.1.0)
class RemoveKeyboard

ReplyKeyboardRemove builder

Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup).

[Documentation]

Properties

options: { isSelective: boolean; }

Methods

build(): TelegramReplyKeyboardRemove

Return TelegramReplyKeyboardRemove as object

selective(isEnabled?: boolean): this

Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.

Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.

toJSON(): TelegramReplyKeyboardRemove

Serializing a class into an TelegramReplyKeyboardRemove object (used by JSON.stringify)

Add Package

deno add jsr:@gramio/keyboards

Import symbol

import { RemoveKeyboard } from "@gramio/keyboards";

---- OR ----

Import directly with a jsr specifier

import { RemoveKeyboard } from "jsr:@gramio/keyboards";

Add Package

npx jsr add @gramio/keyboards

Import symbol

import { RemoveKeyboard } from "@gramio/keyboards";

Add Package

yarn dlx jsr add @gramio/keyboards

Import symbol

import { RemoveKeyboard } from "@gramio/keyboards";

Add Package

pnpm dlx jsr add @gramio/keyboards

Import symbol

import { RemoveKeyboard } from "@gramio/keyboards";

Add Package

bunx jsr add @gramio/keyboards

Import symbol

import { RemoveKeyboard } from "@gramio/keyboards";