Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/grammy/mod.ts>Keyboard#clone

The Telegram Bot Framework.
Go to Latest
method Keyboard.prototype.clone
import { Keyboard } from "https://deno.land/x/grammy@v1.19.1/mod.ts";

Creates and returns a deep copy of this keyboard.

Optionally takes a new grid of buttons to replace the current buttons. If specified, only the options will be cloned, and the given buttons will be used instead.

Parameters

optional
keyboard: KeyboardButton[][] = [UNSUPPORTED]