Allow new button syntax also in legacy mode (buttons with no data)

This commit is contained in:
Davte 2019-07-17 16:54:57 +02:00
parent afb2d26627
commit 44055ff181
2 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@ __author__ = "Davide Testa"
__email__ = "davide@davte.it" __email__ = "davide@davte.it"
__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __credits__ = ["Marco Origlia", "Nick Lee @Nickoala"]
__license__ = "GNU General Public License v3.0" __license__ = "GNU General Public License v3.0"
__version__ = "2.1.3" __version__ = "2.1.4"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"

View File

@ -537,8 +537,9 @@ class Bot(davtelepot.bot.Bot):
) )
return decorator return decorator
def button(self, data, descr='', auth='admin', authorization_level=None, def button(self, data=None, descr='', auth='admin',
prefix=None, description=None, separator=None): authorization_level=None, prefix=None, description=None,
separator=None):
"""Define a bot button. """Define a bot button.
`descr` and `auth` parameters are deprecated: use `description` and `descr` and `auth` parameters are deprecated: use `description` and