@@ -722,6 +722,65 @@ def decorator(func: Callable) -> Callable:
722722
723723 return decorator
724724
725+ def on_updateMessageContainsUnreadPollVotes (
726+ self : pytdbot .Client | None = None ,
727+ filters : pytdbot .filters .Filter | None = None ,
728+ position : int | None = None ,
729+ timeout : float | None = None ,
730+ ) -> Callable :
731+ r"""Unread votes were added or removed from a poll message
732+
733+ Parameters:
734+ filters (:class:`pytdbot.filters.Filter`, *optional*):
735+ An update filter
736+
737+ position (``int``, *optional*):
738+ The function position in handlers list. Default is ``None`` (append)
739+
740+ timeout (``float``, *optional*):
741+ Max execution time for the handler before it timeout. Default is ``None``
742+
743+ Raises:
744+ :py:class:`TypeError`
745+ """
746+
747+ def decorator (func : Callable ) -> Callable :
748+ if hasattr (func , "_handler" ):
749+ return func
750+ elif isinstance (self , pytdbot .Client ):
751+ if iscoroutinefunction (func ):
752+ self .add_handler (
753+ update_type = "updateMessageContainsUnreadPollVotes" ,
754+ func = func ,
755+ filters = filters ,
756+ position = position ,
757+ inner_object = False ,
758+ timeout = timeout ,
759+ )
760+ else :
761+ raise TypeError ("Handler must be async" )
762+ elif isinstance (self , pytdbot .filters .Filter ):
763+ func ._handler = Handler (
764+ func = func ,
765+ update_type = "updateMessageContainsUnreadPollVotes" ,
766+ filter = self ,
767+ position = position ,
768+ inner_object = False ,
769+ timeout = timeout ,
770+ )
771+ else :
772+ func ._handler = Handler (
773+ func = func ,
774+ update_type = "updateMessageContainsUnreadPollVotes" ,
775+ filter = filters ,
776+ position = position ,
777+ inner_object = False ,
778+ timeout = timeout ,
779+ )
780+ return func
781+
782+ return decorator
783+
725784 def on_updateMessageFactCheck (
726785 self : pytdbot .Client | None = None ,
727786 filters : pytdbot .filters .Filter | None = None ,
@@ -9572,6 +9631,65 @@ def decorator(func: Callable) -> Callable:
95729631
95739632 return decorator
95749633
9634+ def on_updateNewGuestQuery (
9635+ self : pytdbot .Client | None = None ,
9636+ filters : pytdbot .filters .Filter | None = None ,
9637+ position : int | None = None ,
9638+ timeout : float | None = None ,
9639+ ) -> Callable :
9640+ r"""A new incoming guest query; for bots only
9641+
9642+ Parameters:
9643+ filters (:class:`pytdbot.filters.Filter`, *optional*):
9644+ An update filter
9645+
9646+ position (``int``, *optional*):
9647+ The function position in handlers list. Default is ``None`` (append)
9648+
9649+ timeout (``float``, *optional*):
9650+ Max execution time for the handler before it timeout. Default is ``None``
9651+
9652+ Raises:
9653+ :py:class:`TypeError`
9654+ """
9655+
9656+ def decorator (func : Callable ) -> Callable :
9657+ if hasattr (func , "_handler" ):
9658+ return func
9659+ elif isinstance (self , pytdbot .Client ):
9660+ if iscoroutinefunction (func ):
9661+ self .add_handler (
9662+ update_type = "updateNewGuestQuery" ,
9663+ func = func ,
9664+ filters = filters ,
9665+ position = position ,
9666+ inner_object = False ,
9667+ timeout = timeout ,
9668+ )
9669+ else :
9670+ raise TypeError ("Handler must be async" )
9671+ elif isinstance (self , pytdbot .filters .Filter ):
9672+ func ._handler = Handler (
9673+ func = func ,
9674+ update_type = "updateNewGuestQuery" ,
9675+ filter = self ,
9676+ position = position ,
9677+ inner_object = False ,
9678+ timeout = timeout ,
9679+ )
9680+ else :
9681+ func ._handler = Handler (
9682+ func = func ,
9683+ update_type = "updateNewGuestQuery" ,
9684+ filter = filters ,
9685+ position = position ,
9686+ inner_object = False ,
9687+ timeout = timeout ,
9688+ )
9689+ return func
9690+
9691+ return decorator
9692+
95759693 def on_updateNewCallbackQuery (
95769694 self : pytdbot .Client | None = None ,
95779695 filters : pytdbot .filters .Filter | None = None ,
0 commit comments