@@ -6973,6 +6973,65 @@ def decorator(func: Callable) -> Callable:
6973
6973
6974
6974
return decorator
6975
6975
6976
+ def on_updateAgeVerificationParameters (
6977
+ self : "pytdbot.Client" = None ,
6978
+ filters : "pytdbot.filters.Filter" = None ,
6979
+ position : int = None ,
6980
+ timeout : float = None ,
6981
+ ) -> Callable :
6982
+ r"""The parameters for age verification of the current user's account has changed
6983
+
6984
+ Parameters:
6985
+ filters (:class:`pytdbot.filters.Filter`, *optional*):
6986
+ An update filter
6987
+
6988
+ position (``int``, *optional*):
6989
+ The function position in handlers list. Default is ``None`` (append)
6990
+
6991
+ timeout (``float``, *optional*):
6992
+ Max execution time for the handler before it timeout. Default is ``None``
6993
+
6994
+ Raises:
6995
+ :py:class:`TypeError`
6996
+ """
6997
+
6998
+ def decorator (func : Callable ) -> Callable :
6999
+ if hasattr (func , "_handler" ):
7000
+ return func
7001
+ elif isinstance (self , pytdbot .Client ):
7002
+ if iscoroutinefunction (func ):
7003
+ self .add_handler (
7004
+ update_type = "updateAgeVerificationParameters" ,
7005
+ func = func ,
7006
+ filters = filters ,
7007
+ position = position ,
7008
+ inner_object = False ,
7009
+ timeout = timeout ,
7010
+ )
7011
+ else :
7012
+ raise TypeError ("Handler must be async" )
7013
+ elif isinstance (self , pytdbot .filters .Filter ):
7014
+ func ._handler = Handler (
7015
+ func = func ,
7016
+ update_type = "updateAgeVerificationParameters" ,
7017
+ filter = self ,
7018
+ position = position ,
7019
+ inner_object = False ,
7020
+ timeout = timeout ,
7021
+ )
7022
+ else :
7023
+ func ._handler = Handler (
7024
+ func = func ,
7025
+ update_type = "updateAgeVerificationParameters" ,
7026
+ filter = filters ,
7027
+ position = position ,
7028
+ inner_object = False ,
7029
+ timeout = timeout ,
7030
+ )
7031
+ return func
7032
+
7033
+ return decorator
7034
+
6976
7035
def on_updateTermsOfService (
6977
7036
self : "pytdbot.Client" = None ,
6978
7037
filters : "pytdbot.filters.Filter" = None ,
0 commit comments