Skip to content

Releases: AeonOrg/Electrogram

Release v0.2.224.4

10 Feb 06:09
9f50ea3

Choose a tag to compare

Release Notes

feat(api): add new Telegram features, button styles, and async path support

Summary by Sourcery

Add support for new Telegram API features including suggested posts, fact-check metadata, advanced gifts, button styles, and paid/quick-reply messaging options, while updating filesystem operations to use async paths and improving compiler and CI tooling.

New Features:

  • Expose concrete type exports for Pyrogram types, bots, bot commands, stories, business objects, and updates to provide a stable public surface.
  • Extend the Gift payment type with additional fields and support for unique gifts from new raw API types.
  • Augment Message, Chat, and User models with fields for stories, paid content, fact-checking, scheduling, and verification metadata from the latest Telegram API.
  • Introduce SuggestedPost, StarsAmount, and FactCheck helper types to represent new business and message metadata structures.
  • Allow button types to accept a higher-level ButtonStyle enum and optional icon, with automatic conversion to KeyboardButtonStyle.
  • Add rich options to message and media sending methods (schedule repeat, paid stars, quick replies, send-as, background sending, drafts, and suggested posts).
  • Add helper for building InputQuickReplyShortcut objects from IDs or names.

Enhancements:

  • Switch many file existence and directory operations from pathlib.Path to anyio.AsyncPath to avoid blocking the event loop in async contexts.
  • Simplify and harden compiler/docs generation by using pathlib, list comprehensions, and safer directory traversal.
  • Mark core TLObject and Object types as unhashable to prevent misuse in hashed collections.
  • Tighten chat privileges with a flag for managing direct messages and expose additional chat/user metadata like bot verification icons and paid message pricing.

Build:

  • Ensure compiler steps only run for wheel/install Hatch targets and relax some ruff lint rules while adding anyio as a runtime dependency.

CI:

  • Update formatting-and-tests workflow to install pytest-asyncio alongside pytest for running async tests.

Documentation:

  • Generate explicit all exports for several type submodules and adjust docs compiler to better categorize and list types and enums in the API reference.

Tests:

  • Enable pytest-asyncio with function-level async loop scope in project configuration and CI, and ensure CI installs pytest-asyncio.

Chores:

  • Add a script to scrape and cache Telegram API documentation metadata for constructors, methods, and types for internal compiler use.

Signed-off-by: 5hojib yesiamshojib@gmail.com
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

Release v0.2.224.3

09 Feb 02:35
3111b7c

Choose a tag to compare

Release Notes

feat(keyboards): add configurable KeyboardButtonStyle support

Summary by Sourcery

Add support for configurable button styles across keyboard button types and integrate the new style type into serialization, deserialization, and documentation.

New Features:

  • Introduce a KeyboardButtonStyle type to represent button appearance options such as primary, danger, success, and custom icons.
  • Allow InlineKeyboardButton, KeyboardButton, and InlineKeyboardButtonBuy to accept an optional style attribute and propagate it through read/write conversions.

Enhancements:

  • Wire KeyboardButtonStyle through LoginUrl button creation and export it from the bots_and_keyboards package and top-level namespace.
  • Update compiler docs to reference the new KeyboardButtonStyle type in the bot keyboards section.

Signed-off-by: 5hojib yesiamshojib@gmail.com
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Release v0.2.224.2

09 Feb 02:28
de1fa76

Choose a tag to compare

Release Notes

Bump version to v0.2.224.2

Release v0.2.224.1

08 Feb 12:04
e845fe2

Choose a tag to compare

Release Notes

something: I forgot.

Summary by Sourcery

Update documentation build process to use uv-based workflows and simplify synchronous client utilities.

Enhancements:

  • Adjust emoji status parsing to support collectible emoji statuses and optional until dates while preserving raw data.
  • Simplify client run logic to always use asynchronous start/idle/stop flow and remove deprecated sync context management and run_sync utilities.
  • Tidy various small style and docstring formatting issues across filters, raw primitives, and type docstrings.
  • Import compose and idle directly from methods.utilities instead of the removed sync module.

Build:

  • Switch docs build script and GitHub workflows to use uv for Python setup, dependency sync, and Sphinx invocation.
  • Pin Sphinx version for docs extra to <8.0.0 and adjust Sphinx config paths for templates, static files, and LaTeX logo.

CI:

  • Update docs generation and format/test workflows to install Python via setup-python, install uv, and rely on uv sync and uv run instead of manual pip and tool management.

Chores:

  • Add uv.lock and update .gitignore accordingly.
  • Apply minor formatting tweaks for gzip-packed and string primitives.

Signed-off-by: 5hojib yesiamshojib@gmail.com
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

Release v0.2.224

31 Jan 06:45
a956f7c

Choose a tag to compare

Release Notes

API: update layer.

Updated the API schema to layer 224. The changes include:

Fetching the new TL schema from the provided URL.
Updating compiler/api/source/main_api.tl while maintaining required core types and setting the layer version.
Updating the project version in pyrogram/init.py.
Running the error scraper to fetch the latest error descriptions.
Regenerating the raw API code and error exceptions.
All generated files have been updated to reflect layer 224.


Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

Release v0.2.196

19 Jan 03:30
02d5045

Choose a tag to compare

Release Notes

ci: Add workflow dispatch trigger for tag and push to pypi.

Summary by Sourcery

CI:

  • Add workflow dispatch trigger.

Signed-off-by: 5hojib yesiamshojib@gmail.com

Release v0.1.194

24 Nov 16:24

Choose a tag to compare

Release Notes

feat: expand to see.

Summary by Sourcery

Add new features for sending and managing gifts, including methods for sending gifts and managing their visibility. Enhance the chat event system with new event types and improve message handling with support for new message types and translation. Update the build process to separate build and publish steps.

New Features:

  • Introduce the ability to send and manage gifts, including methods for sending gifts, getting available gifts, and toggling gift visibility on user profiles.
  • Add support for new message types such as user gifts, star gifts, and gift codes, enhancing the messaging capabilities.
  • Implement a new method for translating message text to different languages, expanding the functionality of message handling.

Enhancements:

  • Enhance the chat event system by adding new event types related to usernames, membership changes, and chat settings toggles.
  • Improve the message reply system by adding support for cross-chat replies and allowing paid broadcasts for bots.
  • Refactor the message parsing logic to support new service message types and improve the handling of existing ones.

Build:

  • Update the build and publish process in the CI workflow to separate the build and publish steps, and switch to using a GitHub Action for publishing to PyPI.

Release v0.1.192

08 Nov 17:41
26a8f7b

Choose a tag to compare

Release Notes

feat: Add support for alternative video qualities in messages.

New Features:

  • Introduce support for alternative video qualities in the message handling, allowing for different video resolutions and codecs.

CI:

  • Update the CI workflow to use the latest version of the 'create-pull-request' action and specify the version for 'setup-rye'.

Documentation:

  • Add documentation for the new 'AlternativeVideo' class, describing its attributes and usage.

Release v0.0.192

31 Oct 15:03
afae6ed

Choose a tag to compare

Release Notes

chore: update CI workflows, remove deprecated method.

New Features:

  • Introduce a new function to scrape error data from Telegram's API and update corresponding TSV files.
  • Add support for handling web page previews in message parsing.
  • Add a new optional parameter 'copy_text' to the InlineKeyboardButton class for copying text to the clipboard.
  • Introduce a new optional parameter 'message_thread_id' in the search_messages method to target specific message threads in supergroups.

Enhancements:

  • Refactor the sort_tsv_files function to improve readability and maintainability.
  • Update exception handling in session start method to include Unauthorized exception.

CI:

  • Update the Python version in the format_and_test workflow to 3.13.
  • Create a new GitHub Actions workflow for scraping errors from Telegram's API.

Chores:

  • Remove the GetNearbyChats method from the chats module.

Signed-off-by: 5hojib yesiamshojib@gmail.com
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 5hojib 5hojib@users.noreply.github.com
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

Release v2.187.0

08 Sep 11:15
6e1ee59

Choose a tag to compare

Release Notes

ci: fix create release.

CI:

  • Modify the GitHub Actions workflow to generate release notes in a separate file and use it for the release body.

Signed-off-by: 5hojib yesiamshojib@gmail.com