Skip to content

Commit

Permalink
fix: some wrong docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Feb 4, 2024
1 parent 9c538f3 commit 2fa8fee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
16 changes: 2 additions & 14 deletions docs/keyboards/force-reply-keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,8 @@ Targets:
2. if the bot's message is a reply to a message in the same chat and forum topic, sender of the original message.

```ts
new ForceReplyKeyboard().selective();
```

### selective

Use this parameter if you want to force reply from specific users only.

Targets:

1. users that are \@mentioned in the _text_ of the [Message](https://core.telegram.org/bots/api/#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.

```ts
new ForceReplyKeyboard().selective();
new ForceReplyKeyboard().selective(); // to enable
new ForceReplyKeyboard().selective(false); // to disable
```

### placeholder
Expand Down
8 changes: 4 additions & 4 deletions docs/keyboards/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ new Keyboard().text("some text").oneTime(false); // to disable
Requests clients to always show the keyboard when the regular keyboard is hidden. Defaults to `false`, in which case the custom keyboard can be hidden and opened with a keyboard icon. Defaults to `false`.

```ts
new Keyboard().text("some text").oneTime(); // to enable
new Keyboard().text("some text").oneTime(false); // to disable
new Keyboard().text("some text").persistent(); // to enable
new Keyboard().text("some text").persistent(false); // to disable
```

### persistent
Expand All @@ -137,8 +137,8 @@ Targets:
_Example:_ A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard. Defaults to `false`.

```ts
new Keyboard().text("some text").persistent(); // to enable
new Keyboard().text("some text").persistent(false); // to disable
new Keyboard().text("some text").selective(); // to enable
new Keyboard().text("some text").selective(false); // to disable
```

### placeholder
Expand Down
3 changes: 2 additions & 1 deletion docs/keyboards/remove-keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ Targets:
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.

```ts
new RemoveKeyboard().selective();
new RemoveKeyboard().selective(); // to enable
new RemoveKeyboard().selective(false); // to disable
```

0 comments on commit 2fa8fee

Please sign in to comment.