Make custombot.Bot().command pass reply_keyboard_button parameter

This commit is contained in:
Davte 2019-08-04 18:07:56 +02:00
parent 5fb28a5c7a
commit 493c127469
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,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.2.3" __version__ = "2.2.4"
__maintainer__ = "Davide Testa" __maintainer__ = "Davide Testa"
__contact__ = "t.me/davte" __contact__ = "t.me/davte"

View File

@ -78,8 +78,6 @@ class Bot(davtelepot.bot.Bot):
database_url=db_name, database_url=db_name,
**kwargs **kwargs
) )
self.messages['commands'] = dict()
self.messages['reply_keyboard_buttons'] = dict()
self.message_handlers['pinned_message'] = self.handle_pinned_message self.message_handlers['pinned_message'] = self.handle_pinned_message
self.message_handlers['photo'] = self.handle_photo_message self.message_handlers['photo'] = self.handle_photo_message
self.message_handlers['location'] = self.handle_location self.message_handlers['location'] = self.handle_location
@ -437,7 +435,8 @@ class Bot(davtelepot.bot.Bot):
return return
def command(self, command, aliases=None, show_in_keyboard=False, def command(self, command, aliases=None, show_in_keyboard=False,
descr="", auth='admin', description=None, reply_keyboard_button=None, descr="", auth='admin',
description=None,
authorization_level=None): authorization_level=None):
"""Define a bot command. """Define a bot command.
@ -449,6 +448,7 @@ class Bot(davtelepot.bot.Bot):
return super().command( return super().command(
command=command, command=command,
aliases=aliases, aliases=aliases,
reply_keyboard_button=reply_keyboard_button,
show_in_keyboard=show_in_keyboard, show_in_keyboard=show_in_keyboard,
description=description, description=description,
authorization_level=authorization_level authorization_level=authorization_level