@@ -535,9 +535,6 @@ def kick_chat_member(self, chat_id, user_id):
535535 def unban_chat_member (self , chat_id , user_id ):
536536 return apihelper .unban_chat_member (self .token , chat_id , user_id )
537537
538- def answer_callback_query (self , callback_query_id , text = None , show_alert = None ):
539- return apihelper .answer_callback_query (self .token , callback_query_id , text , show_alert )
540-
541538 def edit_message_text (self , text , chat_id = None , message_id = None , inline_message_id = None , parse_mode = None ,
542539 disable_web_page_preview = None , reply_markup = None ):
543540 result = apihelper .edit_message_text (self .token , text , chat_id , message_id , inline_message_id , parse_mode ,
@@ -723,9 +720,9 @@ def decorator(handler):
723720 def add_edited_message_handler (self , handler_dict ):
724721 self .edited_message_handlers .append (handler_dict )
725722
726- def inline_handler (self , func ):
723+ def inline_handler (self , func , ** kwargs ):
727724 def decorator (handler ):
728- handler_dict = self ._build_handler_dict (handler , func = func )
725+ handler_dict = self ._build_handler_dict (handler , func = func , ** kwargs )
729726 self .add_inline_handler (handler_dict )
730727 return handler
731728
@@ -734,9 +731,9 @@ def decorator(handler):
734731 def add_inline_handler (self , handler_dict ):
735732 self .inline_handlers .append (handler_dict )
736733
737- def chosen_inline_handler (self , func ):
734+ def chosen_inline_handler (self , func , ** kwargs ):
738735 def decorator (handler ):
739- handler_dict = self ._build_handler_dict (handler , func = func )
736+ handler_dict = self ._build_handler_dict (handler , func = func , ** kwargs )
740737 self .add_chosen_inline_handler (handler_dict )
741738 return handler
742739
@@ -745,9 +742,9 @@ def decorator(handler):
745742 def add_chosen_inline_handler (self , handler_dict ):
746743 self .chosen_inline_handlers .append (handler_dict )
747744
748- def callback_query_handler (self , func ):
745+ def callback_query_handler (self , func , ** kwargs ):
749746 def decorator (handler ):
750- handler_dict = self ._build_handler_dict (handler , func = func )
747+ handler_dict = self ._build_handler_dict (handler , func = func , ** kwargs )
751748 self .add_callback_query_handler (handler_dict )
752749
753750 return decorator
0 commit comments