From 493c1274690dfd5a6d931385308425d47b2e37e3 Mon Sep 17 00:00:00 2001 From: Davte Date: Sun, 4 Aug 2019 18:07:56 +0200 Subject: [PATCH] Make custombot.Bot().command pass reply_keyboard_button parameter --- davtelepot/__init__.py | 2 +- davtelepot/custombot.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 5c6c4e8..8e52186 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -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.3" +__version__ = "2.2.4" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/custombot.py b/davtelepot/custombot.py index 6692407..13f5df3 100644 --- a/davtelepot/custombot.py +++ b/davtelepot/custombot.py @@ -78,8 +78,6 @@ class Bot(davtelepot.bot.Bot): database_url=db_name, **kwargs ) - self.messages['commands'] = dict() - self.messages['reply_keyboard_buttons'] = dict() self.message_handlers['pinned_message'] = self.handle_pinned_message self.message_handlers['photo'] = self.handle_photo_message self.message_handlers['location'] = self.handle_location @@ -437,7 +435,8 @@ class Bot(davtelepot.bot.Bot): return 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): """Define a bot command. @@ -449,6 +448,7 @@ class Bot(davtelepot.bot.Bot): return super().command( command=command, aliases=aliases, + reply_keyboard_button=reply_keyboard_button, show_in_keyboard=show_in_keyboard, description=description, authorization_level=authorization_level