Skip to content

Releases: Senophyx/discord-rpc

6.5

Choose a tag to compare

@Senophyx Senophyx released this 05 Aug 12:37

Overview

Discord-RPC 6.5 is the biggest update since 6.0, and the first release to introduce real-time event subscriptions. You can now subscribe to Rich Presence events (JOIN, JOIN_REQUEST, SPECTATE, INVITE) with the new Event enum and @rpc.on() decorator, and react to activity invites and join requests directly from your Python code.

Under the hood, the entire IPC layer was rebuilt for cross-platform reliability. A single background reader thread now handles all incoming frames and routes responses by nonce, so PING/PONG heartbeats no longer corrupt pending requests, handshake no longer requires a nonce, and Windows imports are loaded only on Windows (no more msvcrt or win32pipe). This fixes multiple long-standing import and blocking issues on Linux and macOS.

The release also adds the AssetManager (rpc.assets) for discovering uploaded assets with CDN URLs, client-side URL validation for buttons and image URLs, new User.avatar_decoration and Application.cover CDN attributes, and a proper test suite (60 tests) running on CI across Ubuntu, Windows, and macOS with Python 3.8 through 3.11. Python 3.8 is now the minimum supported version.

What's Changed

  • feat: add AssetManager with asset discovery and CDN URL support by @SuperZombi in #60
  • feat: add read only alias for ipc.connected by @SuperZombi in #63
  • feat: add event subscription with Event enum and @rpc.on() decorator by @SuperZombi in #66
  • feat: run event listener only when anyone subscribed by @SuperZombi in #66
  • feat: export event exceptions from package root by @Senophyx
  • feat: add cover image and avatar decoration by @SuperZombi in #67
  • feat: validate URLs and improve IPC requests by @SuperZombi in #65
  • refactor: use blocking reader and drop Windows polling by @Senophyx
  • refactor: make Windows imports conditional by @Senophyx
  • refactor: improve logging and disconnect cleanup by @Senophyx
  • fix: correct IPC method annotations preventing package import by @Senophyx
  • fix: centralize exact frame reads and preserve opcodes by @Senophyx
  • fix: route responses by nonce through a single reader by @Senophyx
  • fix: validate handshake and preserve error details by @Senophyx
  • fix: handle PING and PONG without corrupting requests by @Senophyx
  • fix: read handshake frame directly without nonce routing by @Senophyx
  • fix: track subscriptions separately and stop idle readers by @Senophyx
  • fix: release state lock during subscription requests by @Senophyx
  • fix: allow stacked handlers and mark pipe disconnected when idle by @Senophyx
  • fix: validate URL structure and required fields by @Senophyx
  • fix: validate button URLs in set_activity by @Senophyx
  • fix: use PEP 621 license table to unblock wheel builds by @Senophyx
  • style: fix indentation and str formatting by @Senophyx
  • docs: document event subscription API and update changelog by @Senophyx
  • docs: document party and secret requirements, add subscribe example by @Senophyx
  • docs: rename subscribe example to rpc-events by @Senophyx
  • docs: add AssetManager, connected property, and get_assets to DOCS.md by @Senophyx
  • docs: add initial commit link to README by @Senophyx
  • docs: document avatar decoration, cover, and URL utils by @Senophyx
  • docs(changelog): merge 6.5b2 and unreleased into 6.5 by @Senophyx
  • test: add minimal test runner by @Senophyx
  • test: add types tests for avatar decoration and cover by @Senophyx
  • ci: add Python compile and import checks by @Senophyx
  • ci: run test suite on all platforms by @Senophyx
  • build: require Python 3.8 or newer by @Senophyx
  • chore: bump GitHub Actions versions (checkout v6, setup-python v6) by @SuperZombi in #62
  • chore(release): bump version to 6.5 by @Senophyx

Full Changelog: 6.0...6.5

6.0

6.0

Choose a tag to compare

@Senophyx Senophyx released this 20 Jul 17:58
b328a2b

What's Changed

  • feat: add name parameter to set_activity (optional, falls back to Discord app name) by @SuperZombi in #58
  • feat: add ping_every parameter to run() for OP_PING heartbeat by @Senophyx
  • feat: add external URL image support for large_image and small_image by @Senophyx
  • refactor: User and App converted to @cached_property by @SuperZombi in #58
  • refactor: extract shared Pipe logic into _BasePipe class by @Senophyx
  • refactor: rename Button() to button() for PEP8 compliance by @Senophyx
  • refactor: convert TRY_RECONNECTING to instance attribute by @Senophyx
  • refactor: rename logging internal variables for specificity by @Senophyx
  • fix: prevent socket timeout with OP_PING heartbeat every 15s by @Senophyx
  • fix: prevent log handler duplication across multiple RPC instances by @Senophyx
  • fix: remove logging.basicConfig() to avoid polluting user logging by @Senophyx
  • fix: correct set_activity() return type annotation to Optional[bool] by @Senophyx
  • fix: set self.connected from _connect_pipe() return value by @Senophyx
  • fix: UnixPipe._recv() data truncation on large payloads by @Senophyx
  • fix: resolve overly broad except KeyError in handshake() by @Senophyx
  • fix: correct global variable declaration order resolving SyntaxError by @Senophyx
  • fix: remove unused RPCException import in button.py by @Senophyx
  • docs: add clear activity and all-in-one complex RPC examples by @Senophyx
  • docs: add external URL image support to docstrings and examples by @Senophyx
  • docs: fix broken button arguments in print-rpc-output.py example by @Senophyx
  • docs: add CHANGELOG.md with full release history from v2.0 to v6.0 by @Senophyx
  • docs: rewrite DOCS.md with updated API reference by @Senophyx
  • style: fix inconsistent type annotation spacing in set_activity by @Senophyx

Full Changelog: 5.6...6.0

5.6

5.6

Choose a tag to compare

@Senophyx Senophyx released this 14 Jun 12:00

PyPI Page

What's Changed

  • Fix importlib.metadata.PackageNotFoundError by @deeffest in #56
  • Add Application info fetching (rpc.get_app_info()) by @SuperZombi & @Senophyx in #57
  • Refactor: cleanup unused parameter comments and rename ProgressBar to progress_bar by @Senophyx
  • Fix typing and license metadata on pyproject.toml by @Senophyx
  • Replace all-contributors with contrib.rocks by @Senophyx
  • Update docs links and styling by @Senophyx

New Contributors

Full Changelog: 5.5...5.6

5.5

5.5

Choose a tag to compare

@Senophyx Senophyx released this 23 Oct 05:27

PyPI Page

What's Changed

  • PEP 621: Migrating from setup.py to pyproject.toml by in #0ffaca5
  • feat: rewrite Button, added new ActivityType class, fix minor issues by @SuperZombi in #49
  • Add new types and params by @SuperZombi in #50
  • Add some missing types by @jannuary in #53

New Contributors

Full Changelog: 5.1...5.5

5.1

5.1

Choose a tag to compare

@Senophyx Senophyx released this 26 Jul 06:13
50255eb