Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An error in the endpoint name#4679

Unanswered
vavasik800 asked this question inQ&A
Discussion options

Error in spelling the endpoint name for the "editUserStarSubscription" request.
The edit_user_star_subscription function indicates "editUserStartSubscription" and it should be "editUserStarSubscription".
Please change to the correct endpoint, requests are not being processed.

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,        )
You must be logged in to vote

Replies: 2 comments

Comment options

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

You must be logged in to vote
0 replies
Comment options

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

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@vavasik800@Bibo-Joshi@Poolitzer

[8]ページ先頭

©2009-2025 Movatter.jp