Add reply keyboard buttons to aliases if necessary
This commit is contained in:
parent
1b9c039549
commit
6f45b906ff
@ -14,7 +14,7 @@ __author__ = "Davide Testa"
|
||||
__email__ = "davide@davte.it"
|
||||
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
|
||||
__license__ = "GNU General Public License v3.0"
|
||||
__version__ = "2.2.1"
|
||||
__version__ = "2.2.2"
|
||||
__maintainer__ = "Davide Testa"
|
||||
__contact__ = "t.me/davte"
|
||||
|
||||
|
@ -1601,6 +1601,10 @@ class Bot(TelegramBot, ObjectWithDatabase, MultiLanguageObject):
|
||||
"""
|
||||
if not isinstance(command, str):
|
||||
raise TypeError(f'Command `{command}` is not a string')
|
||||
if isinstance(reply_keyboard_button, dict):
|
||||
for button in reply_keyboard_button.values():
|
||||
if button not in aliases:
|
||||
aliases.append(button)
|
||||
if aliases:
|
||||
if not isinstance(aliases, list):
|
||||
raise TypeError(f'Aliases is not a list: `{aliases}`')
|
||||
|
Loading…
x
Reference in New Issue
Block a user