diff --git a/package.json b/package.json index f98e709..33a8e2b 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "build": "deno2node tsconfig.json" }, "peerDependencies": { - "grammy": "^1.40.0" + "grammy": "^1.46.0" }, "devDependencies": { "deno2node": "^1.8.1" diff --git a/src/menu.ts b/src/menu.ts index f3e1d84..b8230c5 100644 --- a/src/menu.ts +++ b/src/menu.ts @@ -471,6 +471,15 @@ export class MenuRange { : loginUrl, }); } + /** + * Adds a disabled button. It does nothing. + */ + disabled( + text: MaybeDynamic | TextWithOptions, + ) { + const base = typeof text === "object" ? text : { text }; + return this.add({ ...base, disabled: {} }); + } /** * Adds a new inline query button. Telegram clients will let the user pick a * chat when this button is pressed. This will start an inline query. The