Skip to content

Commit

Permalink
chore: improve targets docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Feb 4, 2024
1 parent 56c3324 commit f3236fd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
14 changes: 12 additions & 2 deletions docs/keyboards/force-reply-keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,25 @@ These parameters are responsible for the settings of the force reply keyboard

### 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.
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();
```

### 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.
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();
Expand Down
8 changes: 5 additions & 3 deletions docs/keyboards/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,13 @@ new Keyboard().text("some text").oneTime(false); // to disable

### persistent

Use this parameter if you want to show the keyboard to specific users only. Targets:
Use this parameter if you want to show the keyboard to specific users only.

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

_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`.

Expand Down
4 changes: 3 additions & 1 deletion docs/keyboards/remove-keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ These parameters are responsible for the settings of the removal buttons

### selective

Use this parameter if you want to remove the keyboard for specific users only. Targets:
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](https://core.telegram.org/bots/api/#message) object.
Expand Down

0 comments on commit f3236fd

Please sign in to comment.