Skip to content

Add generate_raw.py and update raw API files#51

Open
5hojib wants to merge 1 commit intotestfrom
generate-raw-api-15218819098285557598
Open

Add generate_raw.py and update raw API files#51
5hojib wants to merge 1 commit intotestfrom
generate-raw-api-15218819098285557598

Conversation

@5hojib
Copy link
Member

@5hojib 5hojib commented Feb 7, 2026

This PR adds a generate_raw.py script to the root directory to allow manual triggering of the Telegram API code generation. It also updates .gitignore to ensure the generated files in pyrogram/raw/ and pyrogram/errors/exceptions/ are tracked in the repository, as they were previously ignored but are required for the library to function. The API files have been regenerated using the provided compilers.


PR created automatically by Jules for task 15218819098285557598 started by @5hojib

- Recreate generate_raw.py script in the root directory.
- Update .gitignore to stop ignoring generated API files and error exceptions.
- Run generate_raw.py to populate pyrogram/raw/ and pyrogram/errors/exceptions/.

Co-authored-by: 5hojib <107526130+5hojib@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 3052

@gemini-code-assist
Copy link

Summary of Changes

Hello @5hojib, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on improving the maintainability and accuracy of the Telegram API integration by introducing a dedicated script for API code generation and updating the .gitignore to correctly manage these generated files. It also includes a comprehensive regeneration of API definitions and error handling classes, ensuring the library remains current with the Telegram API.

Highlights

  • API Code Generation Script: A new script, generate_raw.py, has been added to enable manual triggering of Telegram API code generation, streamlining the update process for API definitions.
  • .gitignore Update: The .gitignore file has been modified to ensure that all generated API files within pyrogram/raw/ and pyrogram/errors/exceptions/ are properly tracked in the repository, resolving previous issues where these essential files were ignored.
  • Regenerated API Files: The Telegram API files, including raw API definitions and error exceptions, have been regenerated using the provided compilers, incorporating the latest API changes and ensuring the library's functionality.
  • New Error Exception Classes: Numerous new Python class definitions have been added for various RPC error codes (e.g., 401 Unauthorized, 403 Forbidden, 420 Flood, 500 Internal Server Error, 503 Service Unavailable, 303 See Other, 406 Not Acceptable), enhancing error handling and clarity.
  • Expanded Base Type Definitions: A significant number of new base type definitions have been introduced across various modules (e.g., pyrogram/raw/base/account, pyrogram/raw/base/auth, pyrogram/raw/base/channels, pyrogram/raw/base/messages), reflecting an updated and expanded Telegram API schema.
Changelog
  • .gitignore
    • Removed entries that previously ignored generated Pyrogram code, ensuring these essential files are now tracked.
  • generate_raw.py
    • Added a new Python script to manually trigger the compilation of Telegram API and error exception files.
  • pyrogram/errors/exceptions/init.py
    • Added imports for newly created error exception modules.
  • pyrogram/errors/exceptions/all.py
    • Updated with a comprehensive dictionary mapping Telegram API error codes to their corresponding exception names, including new entries.
  • pyrogram/errors/exceptions/flood_420.py
    • Added new Python class definitions for various Flood (420) RPC errors, each with specific messages and IDs.
  • pyrogram/errors/exceptions/forbidden_403.py
    • Added new Python class definitions for various Forbidden (403) RPC errors, each with specific messages and IDs.
  • pyrogram/errors/exceptions/internal_server_error_500.py
    • Added new Python class definitions for various Internal Server Error (500) RPC errors, each with specific messages and IDs.
  • pyrogram/errors/exceptions/not_acceptable_406.py
    • Added new Python class definitions for various Not Acceptable (406) RPC errors, each with specific messages and IDs.
  • pyrogram/errors/exceptions/see_other_303.py
    • Added new Python class definitions for various See Other (303) RPC errors, each with specific messages and IDs.
  • pyrogram/errors/exceptions/service_unavailable_503.py
    • Added new Python class definitions for various Service Unavailable (503) RPC errors, each with specific messages and IDs.
  • pyrogram/errors/exceptions/unauthorized_401.py
    • Added new Python class definitions for various Unauthorized (401) RPC errors, each with specific messages and IDs.
  • pyrogram/raw/base/init.py
    • Updated the __all__ list and imports to include numerous new base types for various Telegram API objects.
  • pyrogram/raw/base/access_point_rule.py
    • Added a new base type definition for AccessPointRule.
  • pyrogram/raw/base/account/init.py
    • Updated the __all__ list to include new account-related base types.
  • pyrogram/raw/base/account/authorization_form.py
    • Added a new base type definition for account.AuthorizationForm.
  • pyrogram/raw/base/account/authorizations.py
    • Added a new base type definition for account.Authorizations.
  • pyrogram/raw/base/account/auto_download_settings.py
    • Added a new base type definition for account.AutoDownloadSettings.
  • pyrogram/raw/base/account/auto_save_settings.py
    • Added a new base type definition for account.AutoSaveSettings.
  • pyrogram/raw/base/account/business_chat_links.py
    • Added a new base type definition for account.BusinessChatLinks.
  • pyrogram/raw/base/account/chat_themes.py
    • Added a new base type definition for account.ChatThemes.
  • pyrogram/raw/base/account/connected_bots.py
    • Added a new base type definition for account.ConnectedBots.
  • pyrogram/raw/base/account/content_settings.py
    • Added a new base type definition for account.ContentSettings.
  • pyrogram/raw/base/account/email_verified.py
    • Added a new base type definition for account.EmailVerified.
  • pyrogram/raw/base/account/emoji_statuses.py
    • Added a new base type definition for account.EmojiStatuses.
  • pyrogram/raw/base/account/paid_messages_revenue.py
    • Added a new base type definition for account.PaidMessagesRevenue.
  • pyrogram/raw/base/account/passkey_registration_options.py
    • Added a new base type definition for account.PasskeyRegistrationOptions.
  • pyrogram/raw/base/account/passkeys.py
    • Added a new base type definition for account.Passkeys.
  • pyrogram/raw/base/account/password.py
    • Added a new base type definition for account.Password.
  • pyrogram/raw/base/account/password_input_settings.py
    • Added a new base type definition for account.PasswordInputSettings.
  • pyrogram/raw/base/account/password_settings.py
    • Added a new base type definition for account.PasswordSettings.
  • pyrogram/raw/base/account/privacy_rules.py
    • Added a new base type definition for account.PrivacyRules.
  • pyrogram/raw/base/account/reset_password_result.py
    • Added a new base type definition for account.ResetPasswordResult.
  • pyrogram/raw/base/account/resolved_business_chat_links.py
    • Added a new base type definition for account.ResolvedBusinessChatLinks.
  • pyrogram/raw/base/account/saved_music_ids.py
    • Added a new base type definition for account.SavedMusicIds.
  • pyrogram/raw/base/account/saved_ringtone.py
    • Added a new base type definition for account.SavedRingtone.
  • pyrogram/raw/base/account/saved_ringtones.py
    • Added a new base type definition for account.SavedRingtones.
  • pyrogram/raw/base/account/sent_email_code.py
    • Added a new base type definition for account.SentEmailCode.
  • pyrogram/raw/base/account/takeout.py
    • Added a new base type definition for account.Takeout.
  • pyrogram/raw/base/account/themes.py
    • Added a new base type definition for account.Themes.
  • pyrogram/raw/base/account/tmp_password.py
    • Added a new base type definition for account.TmpPassword.
  • pyrogram/raw/base/account/wall_papers.py
    • Added a new base type definition for account.WallPapers.
  • pyrogram/raw/base/account/web_authorizations.py
    • Added a new base type definition for account.WebAuthorizations.
  • pyrogram/raw/base/account_days_ttl.py
    • Added a new base type definition for AccountDaysTTL.
  • pyrogram/raw/base/attach_menu_bot.py
    • Added a new base type definition for AttachMenuBot.
  • pyrogram/raw/base/attach_menu_bot_icon.py
    • Added a new base type definition for AttachMenuBotIcon.
  • pyrogram/raw/base/attach_menu_bot_icon_color.py
    • Added a new base type definition for AttachMenuBotIconColor.
  • pyrogram/raw/base/attach_menu_bots.py
    • Added a new base type definition for AttachMenuBots.
  • pyrogram/raw/base/attach_menu_bots_bot.py
    • Added a new base type definition for AttachMenuBotsBot.
  • pyrogram/raw/base/attach_menu_peer_type.py
    • Added a new base type definition for AttachMenuPeerType.
  • pyrogram/raw/base/auction_bid_level.py
    • Added a new base type definition for AuctionBidLevel.
  • pyrogram/raw/base/auth/init.py
    • Updated the __all__ list to include new auth-related base types.
  • pyrogram/raw/base/auth/authorization.py
    • Added a new base type definition for auth.Authorization.
  • pyrogram/raw/base/auth/code_type.py
    • Added a new base type definition for auth.CodeType.
  • pyrogram/raw/base/auth/exported_authorization.py
    • Added a new base type definition for auth.ExportedAuthorization.
  • pyrogram/raw/base/auth/logged_out.py
    • Added a new base type definition for auth.LoggedOut.
  • pyrogram/raw/base/auth/login_token.py
    • Added a new base type definition for auth.LoginToken.
  • pyrogram/raw/base/auth/passkey_login_options.py
    • Added a new base type definition for auth.PasskeyLoginOptions.
  • pyrogram/raw/base/auth/password_recovery.py
    • Added a new base type definition for auth.PasswordRecovery.
  • pyrogram/raw/base/auth/sent_code.py
    • Added a new base type definition for auth.SentCode.
  • pyrogram/raw/base/auth/sent_code_type.py
    • Added a new base type definition for auth.SentCodeType.
  • pyrogram/raw/base/authorization.py
    • Added a new base type definition for Authorization.
  • pyrogram/raw/base/auto_download_settings.py
    • Added a new base type definition for AutoDownloadSettings.
  • pyrogram/raw/base/auto_save_exception.py
    • Added a new base type definition for AutoSaveException.
  • pyrogram/raw/base/auto_save_settings.py
    • Added a new base type definition for AutoSaveSettings.
  • pyrogram/raw/base/available_effect.py
    • Added a new base type definition for AvailableEffect.
  • pyrogram/raw/base/available_reaction.py
    • Added a new base type definition for AvailableReaction.
  • pyrogram/raw/base/bad_msg_notification.py
    • Added a new base type definition for BadMsgNotification.
  • pyrogram/raw/base/bank_card_open_url.py
    • Added a new base type definition for BankCardOpenUrl.
  • pyrogram/raw/base/base_theme.py
    • Added a new base type definition for BaseTheme.
  • pyrogram/raw/base/bind_auth_key_inner.py
    • Added a new base type definition for BindAuthKeyInner.
  • pyrogram/raw/base/birthday.py
    • Added a new base type definition for Birthday.
  • pyrogram/raw/base/boost.py
    • Added a new base type definition for Boost.
  • pyrogram/raw/base/bot_app.py
    • Added a new base type definition for BotApp.
  • pyrogram/raw/base/bot_app_settings.py
    • Added a new base type definition for BotAppSettings.
  • pyrogram/raw/base/bot_business_connection.py
    • Added a new base type definition for BotBusinessConnection.
  • pyrogram/raw/base/bot_command.py
    • Added a new base type definition for BotCommand.
  • pyrogram/raw/base/bot_command_scope.py
    • Added a new base type definition for BotCommandScope.
  • pyrogram/raw/base/bot_info.py
    • Added a new base type definition for BotInfo.
  • pyrogram/raw/base/bot_inline_message.py
    • Added a new base type definition for BotInlineMessage.
  • pyrogram/raw/base/bot_inline_result.py
    • Added a new base type definition for BotInlineResult.
  • pyrogram/raw/base/bot_menu_button.py
    • Added a new base type definition for BotMenuButton.
  • pyrogram/raw/base/bot_preview_media.py
    • Added a new base type definition for BotPreviewMedia.
  • pyrogram/raw/base/bot_verification.py
    • Added a new base type definition for BotVerification.
  • pyrogram/raw/base/bot_verifier_settings.py
    • Added a new base type definition for BotVerifierSettings.
  • pyrogram/raw/base/bots/init.py
    • Updated the __all__ list to include new bots-related base types.
  • pyrogram/raw/base/bots/bot_info.py
    • Added a new base type definition for bots.BotInfo.
  • pyrogram/raw/base/bots/popular_app_bots.py
    • Added a new base type definition for bots.PopularAppBots.
  • pyrogram/raw/base/bots/preview_info.py
    • Added a new base type definition for bots.PreviewInfo.
  • pyrogram/raw/base/business_away_message.py
    • Added a new base type definition for BusinessAwayMessage.
  • pyrogram/raw/base/business_away_message_schedule.py
    • Added a new base type definition for BusinessAwayMessageSchedule.
  • pyrogram/raw/base/business_bot_recipients.py
    • Added a new base type definition for BusinessBotRecipients.
  • pyrogram/raw/base/business_bot_rights.py
    • Added a new base type definition for BusinessBotRights.
  • pyrogram/raw/base/business_chat_link.py
    • Added a new base type definition for BusinessChatLink.
  • pyrogram/raw/base/business_greeting_message.py
    • Added a new base type definition for BusinessGreetingMessage.
  • pyrogram/raw/base/business_intro.py
    • Added a new base type definition for BusinessIntro.
  • pyrogram/raw/base/business_location.py
    • Added a new base type definition for BusinessLocation.
  • pyrogram/raw/base/business_recipients.py
    • Added a new base type definition for BusinessRecipients.
  • pyrogram/raw/base/business_weekly_open.py
    • Added a new base type definition for BusinessWeeklyOpen.
  • pyrogram/raw/base/business_work_hours.py
    • Added a new base type definition for BusinessWorkHours.
  • pyrogram/raw/base/cdn_config.py
    • Added a new base type definition for CdnConfig.
  • pyrogram/raw/base/cdn_public_key.py
    • Added a new base type definition for CdnPublicKey.
  • pyrogram/raw/base/channel_admin_log_event.py
    • Added a new base type definition for ChannelAdminLogEvent.
  • pyrogram/raw/base/channel_admin_log_event_action.py
    • Added a new base type definition for ChannelAdminLogEventAction.
  • pyrogram/raw/base/channel_admin_log_events_filter.py
    • Added a new base type definition for ChannelAdminLogEventsFilter.
  • pyrogram/raw/base/channel_location.py
    • Added a new base type definition for ChannelLocation.
  • pyrogram/raw/base/channel_messages_filter.py
    • Added a new base type definition for ChannelMessagesFilter.
  • pyrogram/raw/base/channel_participant.py
    • Added a new base type definition for ChannelParticipant.
  • pyrogram/raw/base/channel_participants.py
    • Added a new base type definition for ChannelParticipants.
  • pyrogram/raw/base/channel_participants_filter.py
    • Added a new base type definition for ChannelParticipantsFilter.
  • pyrogram/raw/base/channels/init.py
    • Updated the __all__ list to include new channels-related base types.
  • pyrogram/raw/base/channels/admin_log_results.py
    • Added a new base type definition for channels.AdminLogResults.
  • pyrogram/raw/base/channels/channel_participant.py
    • Added a new base type definition for channels.ChannelParticipant.
  • pyrogram/raw/base/channels/channel_participants.py
    • Added a new base type definition for channels.ChannelParticipants.
  • pyrogram/raw/base/channels/send_as_peers.py
    • Added a new base type definition for channels.SendAsPeers.
  • pyrogram/raw/base/channels/sponsored_message_report_result.py
    • Added a new base type definition for channels.SponsoredMessageReportResult.
  • pyrogram/raw/base/chat.py
    • Added a new base type definition for Chat.
  • pyrogram/raw/base/chat_admin_rights.py
    • Added a new base type definition for ChatAdminRights.
  • pyrogram/raw/base/chat_admin_with_invites.py
    • Added a new base type definition for ChatAdminWithInvites.
  • pyrogram/raw/base/chat_banned_rights.py
    • Added a new base type definition for ChatBannedRights.
  • pyrogram/raw/base/chat_full.py
    • Added a new base type definition for ChatFull.
  • pyrogram/raw/base/chat_invite.py
    • Added a new base type definition for ChatInvite.
  • pyrogram/raw/base/chat_invite_importer.py
    • Added a new base type definition for ChatInviteImporter.
  • pyrogram/raw/base/chat_onlines.py
    • Added a new base type definition for ChatOnlines.
  • pyrogram/raw/base/chat_participant.py
    • Added a new base type definition for ChatParticipant.
  • pyrogram/raw/base/chat_participants.py
    • Added a new base type definition for ChatParticipants.
  • pyrogram/raw/base/chat_photo.py
    • Added a new base type definition for ChatPhoto.
  • pyrogram/raw/base/chat_reactions.py
    • Added a new base type definition for ChatReactions.
  • pyrogram/raw/base/chat_theme.py
    • Added a new base type definition for ChatTheme.
  • pyrogram/raw/base/chatlists/init.py
    • Updated the __all__ list to include new chatlists-related base types.
  • pyrogram/raw/base/chatlists/chatlist_invite.py
    • Added a new base type definition for chatlists.ChatlistInvite.
  • pyrogram/raw/base/chatlists/chatlist_updates.py
    • Added a new base type definition for chatlists.ChatlistUpdates.
  • pyrogram/raw/base/chatlists/exported_chatlist_invite.py
    • Added a new base type definition for chatlists.ExportedChatlistInvite.
  • pyrogram/raw/base/chatlists/exported_invites.py
    • Added a new base type definition for chatlists.ExportedInvites.
  • pyrogram/raw/base/client_dh_inner_data.py
    • Added a new base type definition for ClientDHInnerData.
  • pyrogram/raw/base/code_settings.py
    • Added a new base type definition for CodeSettings.
  • pyrogram/raw/base/config.py
    • Added a new base type definition for Config.
  • pyrogram/raw/base/connected_bot.py
    • Added a new base type definition for ConnectedBot.
  • pyrogram/raw/base/connected_bot_star_ref.py
    • Added a new base type definition for ConnectedBotStarRef.
  • pyrogram/raw/base/contact.py
    • Added a new base type definition for Contact.
  • pyrogram/raw/base/contact_birthday.py
    • Added a new base type definition for ContactBirthday.
  • pyrogram/raw/base/contact_status.py
    • Added a new base type definition for ContactStatus.
  • pyrogram/raw/base/contacts/init.py
    • Updated the __all__ list to include new contacts-related base types.
  • pyrogram/raw/base/contacts/blocked.py
    • Added a new base type definition for contacts.Blocked.
  • pyrogram/raw/base/contacts/contact_birthdays.py
    • Added a new base type definition for contacts.ContactBirthdays.
  • pyrogram/raw/base/contacts/contacts.py
    • Added a new base type definition for contacts.Contacts.
  • pyrogram/raw/base/contacts/found.py
    • Added a new base type definition for contacts.Found.
  • pyrogram/raw/base/contacts/imported_contacts.py
    • Added a new base type definition for contacts.ImportedContacts.
  • pyrogram/raw/base/contacts/resolved_peer.py
    • Added a new base type definition for contacts.ResolvedPeer.
  • pyrogram/raw/base/contacts/sponsored_peers.py
    • Added a new base type definition for contacts.SponsoredPeers.
  • pyrogram/raw/base/contacts/top_peers.py
    • Added a new base type definition for contacts.TopPeers.
  • pyrogram/raw/base/data_json.py
    • Added a new base type definition for DataJSON.
  • pyrogram/raw/base/dc_option.py
    • Added a new base type definition for DcOption.
  • pyrogram/raw/base/default_history_ttl.py
    • Added a new base type definition for DefaultHistoryTTL.
  • pyrogram/raw/base/destroy_auth_key_res.py
    • Added a new base type definition for DestroyAuthKeyRes.
  • pyrogram/raw/base/destroy_session_res.py
    • Added a new base type definition for DestroySessionRes.
  • pyrogram/raw/base/dialog.py
    • Added a new base type definition for Dialog.
  • pyrogram/raw/base/dialog_filter.py
    • Added a new base type definition for DialogFilter.
  • pyrogram/raw/base/dialog_filter_suggested.py
    • Added a new base type definition for DialogFilterSuggested.
  • pyrogram/raw/base/dialog_peer.py
    • Added a new base type definition for DialogPeer.
  • pyrogram/raw/base/disallowed_gifts_settings.py
    • Added a new base type definition for DisallowedGiftsSettings.
  • pyrogram/raw/base/document.py
    • Added a new base type definition for Document.
  • pyrogram/raw/base/document_attribute.py
    • Added a new base type definition for DocumentAttribute.
  • pyrogram/raw/base/draft_message.py
    • Added a new base type definition for DraftMessage.
  • pyrogram/raw/base/email_verification.py
    • Added a new base type definition for EmailVerification.
  • pyrogram/raw/base/email_verify_purpose.py
    • Added a new base type definition for EmailVerifyPurpose.
  • pyrogram/raw/base/emoji_group.py
    • Added a new base type definition for EmojiGroup.
  • pyrogram/raw/base/emoji_keyword.py
    • Added a new base type definition for EmojiKeyword.
  • pyrogram/raw/base/emoji_keywords_difference.py
    • Added a new base type definition for EmojiKeywordsDifference.
  • pyrogram/raw/base/emoji_language.py
    • Added a new base type definition for EmojiLanguage.
  • pyrogram/raw/base/emoji_list.py
    • Added a new base type definition for EmojiList.
  • pyrogram/raw/base/emoji_status.py
    • Added a new base type definition for EmojiStatus.
  • pyrogram/raw/base/emoji_url.py
    • Added a new base type definition for EmojiURL.
  • pyrogram/raw/base/encrypted_chat.py
    • Added a new base type definition for EncryptedChat.
  • pyrogram/raw/base/encrypted_file.py
    • Added a new base type definition for EncryptedFile.
  • pyrogram/raw/base/encrypted_message.py
    • Added a new base type definition for EncryptedMessage.
  • pyrogram/raw/base/exported_chat_invite.py
    • Added a new base type definition for ExportedChatInvite.
  • pyrogram/raw/base/exported_chatlist_invite.py
    • Added a new base type definition for ExportedChatlistInvite.
  • pyrogram/raw/base/exported_contact_token.py
    • Added a new base type definition for ExportedContactToken.
  • pyrogram/raw/base/exported_message_link.py
    • Added a new base type definition for ExportedMessageLink.
  • pyrogram/raw/base/exported_story_link.py
    • Added a new base type definition for ExportedStoryLink.
  • pyrogram/raw/base/fact_check.py
    • Added a new base type definition for FactCheck.
  • pyrogram/raw/base/file_hash.py
    • Added a new base type definition for FileHash.
  • pyrogram/raw/base/folder.py
    • Added a new base type definition for Folder.
  • pyrogram/raw/base/folder_peer.py
    • Added a new base type definition for FolderPeer.
  • pyrogram/raw/base/forum_topic.py
    • Added a new base type definition for ForumTopic.
  • pyrogram/raw/base/found_story.py
    • Added a new base type definition for FoundStory.
  • pyrogram/raw/base/fragment/init.py
    • Updated the __all__ list to include new fragment-related base types.
  • pyrogram/raw/base/fragment/collectible_info.py
    • Added a new base type definition for fragment.CollectibleInfo.
  • pyrogram/raw/base/game.py
    • Added a new base type definition for Game.
  • pyrogram/raw/base/geo_point.py
    • Added a new base type definition for GeoPoint.
  • pyrogram/raw/base/geo_point_address.py
    • Added a new base type definition for GeoPointAddress.
  • pyrogram/raw/base/global_privacy_settings.py
    • Added a new base type definition for GlobalPrivacySettings.
  • pyrogram/raw/base/group_call.py
    • Added a new base type definition for GroupCall.
  • pyrogram/raw/base/group_call_donor.py
    • Added a new base type definition for GroupCallDonor.
  • pyrogram/raw/base/group_call_message.py
    • Added a new base type definition for GroupCallMessage.
  • pyrogram/raw/base/group_call_participant.py
    • Added a new base type definition for GroupCallParticipant.
  • pyrogram/raw/base/group_call_participant_video.py
    • Added a new base type definition for GroupCallParticipantVideo.
  • pyrogram/raw/base/group_call_participant_video_source_group.py
    • Added a new base type definition for GroupCallParticipantVideoSourceGroup.
  • pyrogram/raw/base/group_call_stream_channel.py
    • Added a new base type definition for GroupCallStreamChannel.
  • pyrogram/raw/base/help/init.py
    • Updated the __all__ list to include new help-related base types.
  • pyrogram/raw/base/help/app_config.py
    • Added a new base type definition for help.AppConfig.
  • pyrogram/raw/base/help/app_update.py
    • Added a new base type definition for help.AppUpdate.
  • pyrogram/raw/base/help/config_simple.py
    • Added a new base type definition for help.ConfigSimple.
  • pyrogram/raw/base/help/countries_list.py
    • Added a new base type definition for help.CountriesList.
  • pyrogram/raw/base/help/country.py
    • Added a new base type definition for help.Country.
  • pyrogram/raw/base/help/country_code.py
    • Added a new base type definition for help.CountryCode.
  • pyrogram/raw/base/help/deep_link_info.py
    • Added a new base type definition for help.DeepLinkInfo.
  • pyrogram/raw/base/help/invite_text.py
    • Added a new base type definition for help.InviteText.
  • pyrogram/raw/base/help/passport_config.py
    • Added a new base type definition for help.PassportConfig.
  • pyrogram/raw/base/help/peer_color_option.py
    • Added a new base type definition for help.PeerColorOption.
  • pyrogram/raw/base/help/peer_color_set.py
    • Added a new base type definition for help.PeerColorSet.
  • pyrogram/raw/base/help/peer_colors.py
    • Added a new base type definition for help.PeerColors.
  • pyrogram/raw/base/help/premium_promo.py
    • Added a new base type definition for help.PremiumPromo.
  • pyrogram/raw/base/help/promo_data.py
    • Added a new base type definition for help.PromoData.
  • pyrogram/raw/base/help/recent_me_urls.py
    • Added a new base type definition for help.RecentMeUrls.
  • pyrogram/raw/base/help/support.py
    • Added a new base type definition for help.Support.
  • pyrogram/raw/base/help/support_name.py
    • Added a new base type definition for help.SupportName.
  • pyrogram/raw/base/help/terms_of_service.py
    • Added a new base type definition for help.TermsOfService.
  • pyrogram/raw/base/help/terms_of_service_update.py
    • Added a new base type definition for help.TermsOfServiceUpdate.
  • pyrogram/raw/base/help/timezones_list.py
    • Added a new base type definition for help.TimezonesList.
  • pyrogram/raw/base/help/user_info.py
    • Added a new base type definition for help.UserInfo.
  • pyrogram/raw/base/high_score.py
    • Added a new base type definition for HighScore.
  • pyrogram/raw/base/http_wait.py
    • Added a new base type definition for HttpWait.
  • pyrogram/raw/base/imported_contact.py
    • Added a new base type definition for ImportedContact.
  • pyrogram/raw/base/inline_bot_switch_pm.py
    • Added a new base type definition for InlineBotSwitchPM.
  • pyrogram/raw/base/inline_bot_web_view.py
    • Added a new base type definition for InlineBotWebView.
  • pyrogram/raw/base/inline_query_peer_type.py
    • Added a new base type definition for InlineQueryPeerType.
  • pyrogram/raw/base/input_app_event.py
    • Added a new base type definition for InputAppEvent.
  • pyrogram/raw/base/input_bot_app.py
    • Added a new base type definition for InputBotApp.
  • pyrogram/raw/base/input_bot_inline_message.py
    • Added a new base type definition for InputBotInlineMessage.
  • pyrogram/raw/base/input_bot_inline_message_id.py
    • Added a new base type definition for InputBotInlineMessageID.
  • pyrogram/raw/base/input_bot_inline_result.py
    • Added a new base type definition for InputBotInlineResult.
  • pyrogram/raw/base/input_business_away_message.py
    • Added a new base type definition for InputBusinessAwayMessage.
  • pyrogram/raw/base/input_business_bot_recipients.py
    • Added a new base type definition for InputBusinessBotRecipients.
  • pyrogram/raw/base/input_business_chat_link.py
    • Added a new base type definition for InputBusinessChatLink.
  • pyrogram/raw/base/input_business_greeting_message.py
    • Added a new base type definition for InputBusinessGreetingMessage.
  • pyrogram/raw/base/input_business_intro.py
    • Added a new base type definition for InputBusinessIntro.
  • pyrogram/raw/base/input_business_recipients.py
    • Added a new base type definition for InputBusinessRecipients.
  • pyrogram/raw/base/input_channel.py
    • Added a new base type definition for InputChannel.
  • pyrogram/raw/base/input_chat_photo.py
    • Added a new base type definition for InputChatPhoto.
  • pyrogram/raw/base/input_chat_theme.py
    • Added a new base type definition for InputChatTheme.
  • pyrogram/raw/base/input_chatlist.py
    • Added a new base type definition for InputChatlist.
  • pyrogram/raw/base/input_check_password_srp.py
    • Added a new base type definition for InputCheckPasswordSRP.
  • pyrogram/raw/base/input_client_proxy.py
    • Added a new base type definition for InputClientProxy.
  • pyrogram/raw/base/input_collectible.py
    • Added a new base type definition for InputCollectible.
  • pyrogram/raw/base/input_contact.py
    • Added a new base type definition for InputContact.
  • pyrogram/raw/base/input_dialog_peer.py
    • Added a new base type definition for InputDialogPeer.
  • pyrogram/raw/base/input_document.py
    • Added a new base type definition for InputDocument.
  • pyrogram/raw/base/input_encrypted_chat.py
    • Added a new base type definition for InputEncryptedChat.
  • pyrogram/raw/base/input_encrypted_file.py
    • Added a new base type definition for InputEncryptedFile.
  • pyrogram/raw/base/input_file.py
    • Added a new base type definition for InputFile.
  • pyrogram/raw/base/input_file_location.py
    • Added a new base type definition for InputFileLocation.
  • pyrogram/raw/base/input_folder_peer.py
    • Added a new base type definition for InputFolderPeer.
  • pyrogram/raw/base/input_game.py
    • Added a new base type definition for InputGame.
  • pyrogram/raw/base/input_geo_point.py
    • Added a new base type definition for InputGeoPoint.
  • pyrogram/raw/base/input_group_call.py
    • Added a new base type definition for InputGroupCall.
  • pyrogram/raw/base/input_invoice.py
    • Added a new base type definition for InputInvoice.
  • pyrogram/raw/base/input_media.py
    • Added a new base type definition for InputMedia.
  • pyrogram/raw/base/input_message.py
    • Added a new base type definition for InputMessage.
  • pyrogram/raw/base/input_notify_peer.py
    • Added a new base type definition for InputNotifyPeer.
  • pyrogram/raw/base/input_passkey_credential.py
    • Added a new base type definition for InputPasskeyCredential.
  • pyrogram/raw/base/input_passkey_response.py
    • Added a new base type definition for InputPasskeyResponse.
  • pyrogram/raw/base/input_payment_credentials.py
    • Added a new base type definition for InputPaymentCredentials.
  • pyrogram/raw/base/input_peer.py
    • Added a new base type definition for InputPeer.
  • pyrogram/raw/base/input_peer_notify_settings.py
    • Added a new base type definition for InputPeerNotifySettings.
  • pyrogram/raw/base/input_phone_call.py
    • Added a new base type definition for InputPhoneCall.
  • pyrogram/raw/base/input_photo.py
    • Added a new base type definition for InputPhoto.
  • pyrogram/raw/base/input_privacy_key.py
    • Added a new base type definition for InputPrivacyKey.
  • pyrogram/raw/base/input_privacy_rule.py
    • Added a new base type definition for InputPrivacyRule.
  • pyrogram/raw/base/input_quick_reply_shortcut.py
    • Added a new base type definition for InputQuickReplyShortcut.
  • pyrogram/raw/base/input_reply_to.py
    • Added a new base type definition for InputReplyTo.
  • pyrogram/raw/base/input_saved_star_gift.py
    • Added a new base type definition for InputSavedStarGift.
  • pyrogram/raw/base/input_secure_file.py
    • Added a new base type definition for InputSecureFile.
  • pyrogram/raw/base/input_secure_value.py
    • Added a new base type definition for InputSecureValue.
  • pyrogram/raw/base/input_single_media.py
    • Added a new base type definition for InputSingleMedia.
  • pyrogram/raw/base/input_star_gift_auction.py
    • Added a new base type definition for InputStarGiftAuction.
  • pyrogram/raw/base/input_stars_transaction.py
    • Added a new base type definition for InputStarsTransaction.
  • pyrogram/raw/base/input_sticker_set.py
    • Added a new base type definition for InputStickerSet.
  • pyrogram/raw/base/input_sticker_set_item.py
    • Added a new base type definition for InputStickerSetItem.
  • pyrogram/raw/base/input_stickered_media.py
    • Added a new base type definition for InputStickeredMedia.
  • pyrogram/raw/base/input_store_payment_purpose.py
    • Added a new base type definition for InputStorePaymentPurpose.
  • pyrogram/raw/base/input_theme.py
    • Added a new base type definition for InputTheme.
  • pyrogram/raw/base/input_theme_settings.py
    • Added a new base type definition for InputThemeSettings.
  • pyrogram/raw/base/input_user.py
    • Added a new base type definition for InputUser.
  • pyrogram/raw/base/input_wall_paper.py
    • Added a new base type definition for InputWallPaper.
  • pyrogram/raw/base/input_web_document.py
    • Added a new base type definition for InputWebDocument.
  • pyrogram/raw/base/input_web_file_location.py
    • Added a new base type definition for InputWebFileLocation.
  • pyrogram/raw/base/invoice.py
    • Added a new base type definition for Invoice.
  • pyrogram/raw/base/ip_port.py
    • Added a new base type definition for IpPort.
  • pyrogram/raw/base/json_object_value.py
    • Added a new base type definition for JSONObjectValue.
  • pyrogram/raw/base/json_value.py
    • Added a new base type definition for JSONValue.
  • pyrogram/raw/base/keyboard_button.py
    • Added a new base type definition for KeyboardButton.
  • pyrogram/raw/base/keyboard_button_row.py
    • Added a new base type definition for KeyboardButtonRow.
  • pyrogram/raw/base/keyboard_button_style.py
    • Added a new base type definition for KeyboardButtonStyle.
  • pyrogram/raw/base/labeled_price.py
    • Added a new base type definition for LabeledPrice.
  • pyrogram/raw/base/lang_pack_difference.py
    • Added a new base type definition for LangPackDifference.
  • pyrogram/raw/base/lang_pack_language.py
    • Added a new base type definition for LangPackLanguage.
  • pyrogram/raw/base/lang_pack_string.py
    • Added a new base type definition for LangPackString.
  • pyrogram/raw/base/mask_coords.py
    • Added a new base type definition for MaskCoords.
Activity
  • The pull request was automatically generated by Jules for task 15218819098285557598, initiated by @5hojib.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a script for generating raw API files and includes the newly generated files. The change to .gitignore to track these files is appropriate. However, I've identified a critical issue in the generated exception files: there are duplicate class definitions due to a flaw in the code generation logic. This will cause runtime errors and incorrect exception handling. I've also pointed out a minor issue with an empty docstring in one of the generated classes.

Comment on lines +26 to +30
class AuthRestart(InternalServerError):
"""Internal error (debug info {value}), please repeat the method call."""
ID = "AUTH_RESTART_X"
"""``str``: RPC Error ID"""
MESSAGE = __doc__

Choose a reason for hiding this comment

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

critical

This class AuthRestart is a redefinition of the class with the same name on lines 21-25. This is invalid in Python and will cause the first definition to be overwritten at runtime, leading to incorrect error handling for one of the RPC errors (AUTH_RESTART or AUTH_RESTART_X).

This seems to be caused by a bug in the code generation script where different error IDs are mapped to the same class name. A similar issue exists for EMAIL_UNCONFIRMED and EMAIL_UNCONFIRMED_X which will cause a duplicate EmailUnconfirmed class in bad_request_400.py.

The generator should create unique class names for each error ID, for example by turning _X into X in the class name.

"""``str``: RPC Error ID"""
MESSAGE = __doc__
class ChatFromCallChanged(InternalServerError):
""""""

Choose a reason for hiding this comment

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

medium

The docstring for this exception class is empty. It would be beneficial to add a descriptive message explaining what this error signifies, similar to the other exception classes.

Suggested change
""""""
"""An internal error occurred, and the chat context of a call was changed unexpectedly."""

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant