Skip to content

Fix Embed Edit, include src and dest, include snr#20

Merged
Skordy merged 2 commits into
ArizonaMeshtasticCommunity:mainfrom
tylerpieper:main
Jun 15, 2026
Merged

Fix Embed Edit, include src and dest, include snr#20
Skordy merged 2 commits into
ArizonaMeshtasticCommunity:mainfrom
tylerpieper:main

Conversation

@tylerpieper

Copy link
Copy Markdown
Contributor

Description

This PR addresses issues with traceroute embeds failing to edit or append when replies are received, and greatly enhances the information displayed in the route path.

Changes

  • Fix Embed Edit Crash: Replaced discord.Embed.from_dict() with a much safer .copy() method when duplicating the original embed. This prevents TypeError crashes that were occurring during payload conversions. Additionally, catching a generic Exception ensures the bot will always gracefully fall back to posting a new message if the edit fails for any reason.
  • Include Source and Destination in Route: The RouteDiscovery payload only tracks intermediary nodes. Added logic to correctly prepend the origin and append the destination to the traceroute path so the full route is visible.
  • Include SNR in Route Display: Extracted the snr_towards array from the RouteDiscovery payload. If the SNR data matches the forward path, the route is now formatted to show the signal-to-noise ratio at each hop (e.g., NOD1 --(-2.5)→ NOD2 --(3.2)→ NOD3).

Testing

  • Verify that traceroute replies successfully edit existing message embeds or post new ones.
  • Verify that the source and destination are properly appended to the displayed path.
  • Verify that the SNR parses successfully when provided by the node hardware.

@Skordy
Skordy merged commit 896334a into ArizonaMeshtasticCommunity:main Jun 15, 2026
1 check passed
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.

2 participants