- Notifications
You must be signed in to change notification settings - Fork5.7k
An error in the endpoint name#4679
-
Error in spelling the endpoint name for the "editUserStarSubscription" request. asyncdefedit_user_star_subscription(self,user_id:int,telegram_payment_charge_id:str,is_canceled:bool,*,read_timeout:ODVInput[float]=DEFAULT_NONE,write_timeout:ODVInput[float]=DEFAULT_NONE,connect_timeout:ODVInput[float]=DEFAULT_NONE,pool_timeout:ODVInput[float]=DEFAULT_NONE,api_kwargs:Optional[JSONDict]=None, )->bool:"""Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. .. versionadded:: 21.8 Args: user_id (:obj:`int`): Identifier of the user whose subscription will be edited. telegram_payment_charge_id (:obj:`str`): Telegram payment identifier for the subscription. is_canceled (:obj:`bool`): Pass :obj:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :obj:`False` to allow the user to re-enable a subscription that was previously canceled by the bot. Returns: :obj:`bool`: On success, :obj:`True` is returned. Raises: :class:`telegram.error.TelegramError` """data:JSONDict= {"user_id":user_id,"telegram_payment_charge_id":telegram_payment_charge_id,"is_canceled":is_canceled, }returnawaitself._post("editUserStartSubscription",data,read_timeout=read_timeout,write_timeout=write_timeout,connect_timeout=connect_timeout,pool_timeout=pool_timeout,api_kwargs=api_kwargs, ) Correct: asyncdefedit_user_star_subscription(self,user_id:int,telegram_payment_charge_id:str,is_canceled:bool,*,read_timeout:ODVInput[float]=DEFAULT_NONE,write_timeout:ODVInput[float]=DEFAULT_NONE,connect_timeout:ODVInput[float]=DEFAULT_NONE,pool_timeout:ODVInput[float]=DEFAULT_NONE,api_kwargs:Optional[JSONDict]=None, )->bool:"""Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. .. versionadded:: 21.8 Args: user_id (:obj:`int`): Identifier of the user whose subscription will be edited. telegram_payment_charge_id (:obj:`str`): Telegram payment identifier for the subscription. is_canceled (:obj:`bool`): Pass :obj:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :obj:`False` to allow the user to re-enable a subscription that was previously canceled by the bot. Returns: :obj:`bool`: On success, :obj:`True` is returned. Raises: :class:`telegram.error.TelegramError` """data:JSONDict= {"user_id":user_id,"telegram_payment_charge_id":telegram_payment_charge_id,"is_canceled":is_canceled, }returnawaitself._post("editUserStarSubscription",data,read_timeout=read_timeout,write_timeout=write_timeout,connect_timeout=connect_timeout,pool_timeout=pool_timeout,api_kwargs=api_kwargs, ) |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
good catch, wonder if we should have a test if all api calls we code are actually valid At least for those where we dont have any actual requests to telegram |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thank for the report! FYI, until we release a fix, you can usehttps://docs.python-telegram-bot.org/en/stable/telegram.bot.html#telegram.Bot.do_api_request |
BetaWas this translation helpful?Give feedback.