ReplyKeyboardMarkup Class

Represents a custom keyboard with reply options.

Properties

  • inputFieldPlaceholder: string
  • isPersistent: boolean
  • keyboard:
  • oneTimeKeyboard: boolean
  • resizeKeyboard: boolean
  • selective: boolean

Methods

  • setInputFieldPlaceholder(inputFieldPlaceholder: string)
  • setIsPersistent(isPersistent: boolean)
  • setKeyboard(keyboard: undefined)
  • setOneTimeKeyboard(oneTimeKeyboard: boolean)
  • setResizeKeyboard(resizeKeyboard: boolean)
  • setSelective(selective: boolean)
  • toJSON()
{
  "id": 1786,
  "name": "ReplyKeyboardMarkup",
  "variant": "declaration",
  "kind": 128,
  "flags": {},
  "comment": {
    "summary": [
      {
        "kind": "text",
        "text": "Represents a custom keyboard with reply options."
      }
    ],
    "blockTags": [
      {
        "tag": "@see",
        "content": [
          {
            "kind": "inline-tag",
            "tag": "@link",
            "text": "https://core.telegram.org/bots#keyboards",
            "target": "https://core.telegram.org/bots#keyboards"
          }
        ]
      }
    ]
  },
  "children": [
    {
      "id": 1787,
      "name": "constructor",
      "variant": "declaration",
      "kind": 512,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 43,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1788,
          "name": "new ReplyKeyboardMarkup",
          "variant": "signature",
          "kind": 16384,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 43,
              "character": 1
            }
          ],
          "parameters": [
            {
              "id": 1789,
              "name": "data",
              "variant": "param",
              "kind": 32768,
              "flags": {},
              "type": {
                "type": "reference",
                "target": 2369,
                "name": "ReplyKeyboardMarkupData",
                "package": "tgkit"
              },
              "defaultValue": "{}"
            }
          ],
          "type": {
            "type": "reference",
            "target": 1786,
            "name": "ReplyKeyboardMarkup",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      ]
    },
    {
      "id": 1794,
      "name": "inputFieldPlaceholder",
      "variant": "declaration",
      "kind": 1024,
      "flags": {
        "isOptional": true
      },
      "comment": {
        "summary": [
          {
            "kind": "text",
            "text": "The placeholder to be shown in the input field when the keyboard is active; 1-64 characters"
          }
        ]
      },
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 34,
          "character": 1
        }
      ],
      "type": {
        "type": "intrinsic",
        "name": "string"
      }
    },
    {
      "id": 1791,
      "name": "isPersistent",
      "variant": "declaration",
      "kind": 1024,
      "flags": {
        "isOptional": true
      },
      "comment": {
        "summary": [
          {
            "kind": "text",
            "text": "Requests clients to always show the keyboard when the regular keyboard is hidden.\nDefaults to false, in which case the custom keyboard can be hidden and opened with a keyboard icon."
          }
        ]
      },
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 16,
          "character": 1
        }
      ],
      "type": {
        "type": "intrinsic",
        "name": "boolean"
      }
    },
    {
      "id": 1790,
      "name": "keyboard",
      "variant": "declaration",
      "kind": 1024,
      "flags": {},
      "comment": {
        "summary": [
          {
            "kind": "text",
            "text": "Array of button rows, each represented by an Array of KeyboardButton objects"
          }
        ]
      },
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 10,
          "character": 1
        }
      ],
      "type": {
        "type": "array",
        "elementType": {
          "type": "array",
          "elementType": {
            "type": "reference",
            "target": 1421,
            "name": "KeyboardButton",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      }
    },
    {
      "id": 1793,
      "name": "oneTimeKeyboard",
      "variant": "declaration",
      "kind": 1024,
      "flags": {
        "isOptional": true
      },
      "comment": {
        "summary": [
          {
            "kind": "text",
            "text": "Requests clients to hide the keyboard as soon as it's been used.\nThe keyboard will still be available, but clients will automatically display the usual letter-keyboard\nin the chat – the user can press a special button in the input field to see the custom keyboard again.\nDefaults to false."
          }
        ]
      },
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 31,
          "character": 1
        }
      ],
      "type": {
        "type": "intrinsic",
        "name": "boolean"
      }
    },
    {
      "id": 1792,
      "name": "resizeKeyboard",
      "variant": "declaration",
      "kind": 1024,
      "flags": {
        "isOptional": true
      },
      "comment": {
        "summary": [
          {
            "kind": "text",
            "text": "Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller \nif there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always\nof the same height as the app's standard keyboard."
          }
        ]
      },
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 23,
          "character": 1
        }
      ],
      "type": {
        "type": "intrinsic",
        "name": "boolean"
      }
    },
    {
      "id": 1795,
      "name": "selective",
      "variant": "declaration",
      "kind": 1024,
      "flags": {
        "isOptional": true
      },
      "comment": {
        "summary": [
          {
            "kind": "text",
            "text": "Use this parameter if you want to show the keyboard to specific users only. Targets:\n1) users that are"
          }
        ],
        "blockTags": [
          {
            "tag": "@mentioned",
            "content": [
              {
                "kind": "text",
                "text": "in the text of the Message object;\n2) if the bot's message is a reply (has replyToMessageId), sender of the original message."
              }
            ]
          }
        ]
      },
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 41,
          "character": 1
        }
      ],
      "type": {
        "type": "intrinsic",
        "name": "boolean"
      }
    },
    {
      "id": 1808,
      "name": "setInputFieldPlaceholder",
      "variant": "declaration",
      "kind": 2048,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 73,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1809,
          "name": "setInputFieldPlaceholder",
          "variant": "signature",
          "kind": 4096,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 73,
              "character": 1
            }
          ],
          "parameters": [
            {
              "id": 1810,
              "name": "inputFieldPlaceholder",
              "variant": "param",
              "kind": 32768,
              "flags": {},
              "type": {
                "type": "intrinsic",
                "name": "string"
              }
            }
          ],
          "type": {
            "type": "reference",
            "target": 1786,
            "name": "ReplyKeyboardMarkup",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      ]
    },
    {
      "id": 1799,
      "name": "setIsPersistent",
      "variant": "declaration",
      "kind": 2048,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 58,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1800,
          "name": "setIsPersistent",
          "variant": "signature",
          "kind": 4096,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 58,
              "character": 1
            }
          ],
          "parameters": [
            {
              "id": 1801,
              "name": "isPersistent",
              "variant": "param",
              "kind": 32768,
              "flags": {},
              "type": {
                "type": "intrinsic",
                "name": "boolean"
              }
            }
          ],
          "type": {
            "type": "reference",
            "target": 1786,
            "name": "ReplyKeyboardMarkup",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      ]
    },
    {
      "id": 1796,
      "name": "setKeyboard",
      "variant": "declaration",
      "kind": 2048,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 53,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1797,
          "name": "setKeyboard",
          "variant": "signature",
          "kind": 4096,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 53,
              "character": 1
            }
          ],
          "parameters": [
            {
              "id": 1798,
              "name": "keyboard",
              "variant": "param",
              "kind": 32768,
              "flags": {},
              "type": {
                "type": "array",
                "elementType": {
                  "type": "array",
                  "elementType": {
                    "type": "reference",
                    "target": 1421,
                    "name": "KeyboardButton",
                    "package": "tgkit",
                    "qualifiedName": "default"
                  }
                }
              }
            }
          ],
          "type": {
            "type": "reference",
            "target": 1786,
            "name": "ReplyKeyboardMarkup",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      ]
    },
    {
      "id": 1805,
      "name": "setOneTimeKeyboard",
      "variant": "declaration",
      "kind": 2048,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 68,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1806,
          "name": "setOneTimeKeyboard",
          "variant": "signature",
          "kind": 4096,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 68,
              "character": 1
            }
          ],
          "parameters": [
            {
              "id": 1807,
              "name": "oneTimeKeyboard",
              "variant": "param",
              "kind": 32768,
              "flags": {},
              "type": {
                "type": "intrinsic",
                "name": "boolean"
              }
            }
          ],
          "type": {
            "type": "reference",
            "target": 1786,
            "name": "ReplyKeyboardMarkup",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      ]
    },
    {
      "id": 1802,
      "name": "setResizeKeyboard",
      "variant": "declaration",
      "kind": 2048,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 63,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1803,
          "name": "setResizeKeyboard",
          "variant": "signature",
          "kind": 4096,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 63,
              "character": 1
            }
          ],
          "parameters": [
            {
              "id": 1804,
              "name": "resizeKeyboard",
              "variant": "param",
              "kind": 32768,
              "flags": {},
              "type": {
                "type": "intrinsic",
                "name": "boolean"
              }
            }
          ],
          "type": {
            "type": "reference",
            "target": 1786,
            "name": "ReplyKeyboardMarkup",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      ]
    },
    {
      "id": 1811,
      "name": "setSelective",
      "variant": "declaration",
      "kind": 2048,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 78,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1812,
          "name": "setSelective",
          "variant": "signature",
          "kind": 4096,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 78,
              "character": 1
            }
          ],
          "parameters": [
            {
              "id": 1813,
              "name": "selective",
              "variant": "param",
              "kind": 32768,
              "flags": {},
              "type": {
                "type": "intrinsic",
                "name": "boolean"
              }
            }
          ],
          "type": {
            "type": "reference",
            "target": 1786,
            "name": "ReplyKeyboardMarkup",
            "package": "tgkit",
            "qualifiedName": "default"
          }
        }
      ]
    },
    {
      "id": 1814,
      "name": "toJSON",
      "variant": "declaration",
      "kind": 2048,
      "flags": {},
      "sources": [
        {
          "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
          "line": 83,
          "character": 1
        }
      ],
      "signatures": [
        {
          "id": 1815,
          "name": "toJSON",
          "variant": "signature",
          "kind": 4096,
          "flags": {},
          "sources": [
            {
              "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
              "line": 83,
              "character": 1
            }
          ],
          "type": {
            "type": "intrinsic",
            "name": "object"
          }
        }
      ]
    }
  ],
  "groups": [
    {
      "title": "Constructors",
      "children": [
        1787
      ]
    },
    {
      "title": "Properties",
      "children": [
        1794,
        1791,
        1790,
        1793,
        1792,
        1795
      ]
    },
    {
      "title": "Methods",
      "children": [
        1808,
        1799,
        1796,
        1805,
        1802,
        1811,
        1814
      ]
    }
  ],
  "sources": [
    {
      "fileName": "packages/tgkit/src/structures/ReplyKeyboardMarkup.ts",
      "line": 8,
      "character": 21
    }
  ]
}