mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Merge pull request #277 from i32ropie/master
Updated from ReplyKeyboardHide() methode to ReplyKeyboardRemove()
This commit is contained in:
commit
d6af33fef7
@ -303,7 +303,7 @@ file = requests.get('https://api.telegram.org/file/bot{0}/{1}'.format(API_TOKEN,
|
|||||||
|
|
||||||
```
|
```
|
||||||
#### Reply markup
|
#### Reply markup
|
||||||
All `send_xyz` functions of TeleBot take an optional `reply_markup` argument. This argument must be an instance of `ReplyKeyboardMarkup`, `ReplyKeyboardHide` or `ForceReply`, which are defined in types.py.
|
All `send_xyz` functions of TeleBot take an optional `reply_markup` argument. This argument must be an instance of `ReplyKeyboardMarkup`, `ReplyKeyboardRemove` or `ForceReply`, which are defined in types.py.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from telebot import types
|
from telebot import types
|
||||||
@ -339,9 +339,9 @@ The last example yields this result:
|
|||||||

|

|
||||||
|
|
||||||
```python
|
```python
|
||||||
# ReplyKeyboardHide: hides a previously sent ReplyKeyboardMarkup
|
# ReplyKeyboardRemove: hides a previously sent ReplyKeyboardMarkup
|
||||||
# Takes an optional selective argument (True/False, default False)
|
# Takes an optional selective argument (True/False, default False)
|
||||||
markup = types.ReplyKeyboardHide(selective=False)
|
markup = types.ReplyKeyboardRemove(selective=False)
|
||||||
tb.send_message(chat_id, message, reply_markup=markup)
|
tb.send_message(chat_id, message, reply_markup=markup)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -497,7 +497,7 @@ Reply markup
|
|||||||
|
|
||||||
All ``send_xyz`` functions of TeleBot take an optional ``reply_markup``
|
All ``send_xyz`` functions of TeleBot take an optional ``reply_markup``
|
||||||
argument. This argument must be an instance of ``ReplyKeyboardMarkup``,
|
argument. This argument must be an instance of ``ReplyKeyboardMarkup``,
|
||||||
``ReplyKeyboardHide`` or ``ForceReply``, which are defined in types.py.
|
``ReplyKeyboardRemove`` or ``ForceReply``, which are defined in types.py.
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
@ -538,9 +538,9 @@ The last example yields this result:
|
|||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
# ReplyKeyboardHide: hides a previously sent ReplyKeyboardMarkup
|
# ReplyKeyboardRemove: hides a previously sent ReplyKeyboardMarkup
|
||||||
# Takes an optional selective argument (True/False, default False)
|
# Takes an optional selective argument (True/False, default False)
|
||||||
markup = types.ReplyKeyboardHide(selective=False)
|
markup = types.ReplyKeyboardRemove(selective=False)
|
||||||
tb.send_message(chat_id, message, reply_markup=markup)
|
tb.send_message(chat_id, message, reply_markup=markup)
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
@ -21,7 +21,7 @@ commands = { # command description used in the "help" command
|
|||||||
imageSelect = types.ReplyKeyboardMarkup(one_time_keyboard=True) # create the image selection keyboard
|
imageSelect = types.ReplyKeyboardMarkup(one_time_keyboard=True) # create the image selection keyboard
|
||||||
imageSelect.add('cock', 'pussy')
|
imageSelect.add('cock', 'pussy')
|
||||||
|
|
||||||
hideBoard = types.ReplyKeyboardHide() # if sent as reply_markup, will hide the keyboard
|
hideBoard = types.ReplyKeyboardRemove() # if sent as reply_markup, will hide the keyboard
|
||||||
|
|
||||||
|
|
||||||
# error handling if user isn't known yet
|
# error handling if user isn't known yet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user