Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] API 7.2 #4179

Closed
27 tasks done
Poolitzer opened this issue Mar 31, 2024 · 8 comments · Fixed by #4180
Closed
27 tasks done

[Feature] API 7.2 #4179

Poolitzer opened this issue Mar 31, 2024 · 8 comments · Fixed by #4180
Assignees
Labels

Comments

@Poolitzer
Copy link
Member

Poolitzer commented Mar 31, 2024

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

Next bot api update \o/

Important

Describe the solution you'd like

Integration with Business Accounts [Taken by @harshil21]

  • Added the class BusinessConnection and updates about the connection or disconnection of the bot to a business account, represented by the field business_connection in the class Update.
  • Added updates about new messages in a business account connected to the bot, represented by the field business_message in the class Update.
  • Added updates about message edits in a business account connected to the bot, represented by the field edited_business_message in the class Update.
  • Added updates about message deletion in a business account connected to the bot, represented by the class BusinessMessagesDeleted and the field deleted_business_messages in the class Update.
  • Added the method getBusinessConnection.

Working on Behalf of Business Accounts [Taken by @harshil21]

Information about Business Accounts [Taken by @aelkheir - #4183]

Mixed-Format Sticker Packs [Taken by @harshil21]

  • Removed the fields is_animated and is_video from the class StickerSet.
  • Added the field format to the class InputSticker.
  • Removed the parameter sticker_format from the method createNewStickerSet.
  • Added the parameter format to the method setStickerSetThumbnail.
  • Increased the maximum number of stickers in any regular and mask sticker set to 120.
  • Allowed to upload WEBM stickers using SendSticker.

Request Chat Improvements [Taken by @clot27]

  • Added the fields request_name, request_username, and request_photo to the class KeyboardButtonRequestUsers.
  • Added the fields request_title, request_username, and request_photo to the class KeyboardButtonRequestChat.
  • Added the class SharedUser and replaced the field user_ids in the class UsersShared with the field users.
  • Added the fields title, username, and photo to the class ChatShared.

Other Changes

Describe alternatives you've considered

If you want to contribute, you can start from the Contribution Guide.

Additional context

Please comment below before start working on any part of the update so as to keep things in track and avoid double work.

@Poolitzer Poolitzer added the API label Mar 31, 2024
@Poolitzer Poolitzer pinned this issue Mar 31, 2024
@harshil21
Copy link
Member

harshil21 commented Mar 31, 2024

I'll take the "working on behalf of business accounts" & "Integration with Business accounts" section

@harshil21 harshil21 self-assigned this Mar 31, 2024
@aelkheir
Copy link
Contributor

I wanted to create some ptb quality classes so badly 🥹, soo

Information about Business Accounts

  • Added the class BusinessIntro and the field business_intro to the class Chat.
  • Added the class BusinessLocation and the field business_location to the class Chat.
  • Added the classes BusinessOpeningHours and BusinessOpeningHoursInterval and the field business_opening_hours to the class Chat.

@clot27
Copy link
Member

clot27 commented Mar 31, 2024

I'll take the "Request Chat Improvements" part

@clot27 clot27 self-assigned this Mar 31, 2024
@RanaUniverse
Copy link

i really want to work here and contribute ♥️♥️♥️
if any easy topic is here which will suitable for easy to start with as i want to start freshly,
any suggestion pls me, i will try to check, i am still not good in OOP here, i need to look pls suggest me something which topic to choose,
like👇👇👇

maybe i can remove the is_animated or is_video parameters to remove from the Sticker Set Class

@harshil21
Copy link
Member

harshil21 commented Apr 1, 2024

if any easy topic is here which will suitable for easy to start with as i want to start freshly, any suggestion pls me

alright, you can try doing the "Added the field is_from_offline to the class Message." part. You basically have to copy the field documentation from core.telegram.org/bots/api#message into our library.

How to add the field:

  1. Open _message.py and scroll to the class documentation.
  2. Add entry for is_from_offline in both the Args section and Attributes section.
  3. Scroll down to the __slots__ tuple and add is_from_offline there also.
  4. Scroll further to __init__ and add is_from_offline to the last entry, just before the *.
  5. Add self.is_from_offline = is_from_offline to the __init__ body.

For adapting tests:

  1. Open the test_message.py file and add an entry for is_from_offline here.
  2. Add an entry to the ids list just below that.

Don't forget to base your branch on api-7.2.

@RanaUniverse
Copy link

still it looks like i need a more learn python with background works with dunder and so on,
i think if i will download the PTB zip and edit and send the edited zip to u then can be be done,

as the git commands which are said in the guide section is really going over my head,
and i am not familiar with these.

@harshil21
Copy link
Member

@RanaUniverse If that is the case, you can learn git and get more familiar with OOP and contribute in another issue at a later date.

@aelkheir aelkheir mentioned this issue Apr 1, 2024
12 tasks
@Bibo-Joshi Bibo-Joshi mentioned this issue Apr 1, 2024
25 tasks
@mahdyar
Copy link
Contributor

mahdyar commented Apr 2, 2024

I'll take the "Added the field is_from_offline to the class Message" section

@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2024
@clot27 clot27 unpinned this issue May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants