Skip to content

Conversation

@coder2020official
Copy link
Collaborator

@coder2020official coder2020official commented Feb 13, 2025

February 12, 2025
Bot API 8.3

  • Added the parameter chat_id to the method sendGift, allowing bots to send gifts to channel chats.
  • Added the field can_send_gift to the class ChatFullInfo.
  • Added the class TransactionPartnerChat describing transactions with chats.
  • Added the fields cover and start_timestamp to the class Video, containing a message-specific cover and a start timestamp for the video.
  • Added the parameters cover and start_timestamp to the method sendVideo, allowing bots to specify a cover and a start timestamp for the videos they send.
  • Added the fields cover and start_timestamp to the classes InputMediaVideo and InputPaidMediaVideo, allowing bots to edit video cover and start timestamp and specify them for videos in albums and paid media.
  • Added the parameter video_start_timestamp to the methods forwardMessage and copyMessage, allowing bots to change the start timestamp for forwarded and copied videos.
  • Allowed to add reactions to most types of service messages.(NO NEED FOR COMMIT)

…ning a message-specific cover and a start timestamp for the video.
…o, allowing bots to specify a cover and a start timestamp for the videos they send.
…ideo and InputPaidMediaVideo, allowing bots to edit video cover and start timestamp and specify them for videos in albums and paid media.
…ge and copyMessage, allowing bots to change the start timestamp for forwarded and copied videos.
@coder2020official
Copy link
Collaborator Author

@Badiboy hi, done with bot api 8.3 update, you can start reviewing

@Badiboy
Copy link
Collaborator

Badiboy commented Feb 13, 2025

Got it

return apihelper.delete_sticker_set(self.token, name)

def send_gift(self, user_id: int, gift_id: str, text: Optional[str]=None, text_parse_mode: Optional[str]=None,
def send_gift(self, gift_id: str, user_id: Optional[Union[str, int]] = None, chat_id: Optional[Union[str, int]] = None, text: Optional[str]=None, text_parse_mode: Optional[str]=None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot change order of fixed parameters or ones who had been fixed. :(((

In this case I propose to make all parameters optional and check inside gift_id to be not None. Or even not check: Telegram will return error himself.

Mark in manual, that gift_id IS NOT optional in fact.

def send_gift(self, user_id: Optional[Union[str, int]] = None, gift_id: Optional[Union[str, int]] = None, chat_id: Optional[Union[str, int]] = None, text: Optional[str]=None, text_parse_mode: Optional[str]=None,...

if not gift_id:
    ValueError("gift_id must be specified.")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get annoyed to see how we are still 'outdated' from the API. Will fix it :(


async def send_gift(self, user_id: int, gift_id: str, text: Optional[str]=None, text_parse_mode: Optional[str]=None,
text_entities: Optional[List[types.MessageEntity]]=None, pay_for_upgrade: Optional[bool]=None) -> bool:
async def send_gift(self, gift_id: str, user_id: Optional[Union[str, int]] = None, chat_id: Optional[Union[str, int]] = None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here: not possible to change fixed parameters order. :(

@Badiboy
Copy link
Collaborator

Badiboy commented Feb 15, 2025

We are absolutely not outdated from API. We have just some small compatibility overheads that makes this library absoutely safe for years for any users who want to update library to actual version.

@Badiboy Badiboy merged commit 1baa9cf into eternnoir:master Feb 15, 2025
7 checks passed
@Badiboy
Copy link
Collaborator

Badiboy commented Feb 15, 2025

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants