Queer European MD passionate about IT
Kaynağa Gözat

Make custombot.Bot().command pass reply_keyboard_button parameter

Davte 5 yıl önce
ebeveyn
işleme
493c127469
2 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 1 1
      davtelepot/__init__.py
  2. 3 3
      davtelepot/custombot.py

+ 1 - 1
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"
 

+ 3 - 3
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