JacobCoffee / byte

The Discord bot built for developers
https://byte-bot.app/
MIT License
5 stars 2 forks source link

Enhancement(astral): Smart chunking of embed field data #75

Open JacobCoffee opened 8 months ago

JacobCoffee commented 8 months ago

Summary

Embed fields are limited to <1024 characters, so we introduced chunking logic. https://github.com/JacobCoffee/byte/blob/f814685dd8af28d979b9cc735527f2d367073b93/src/byte/plugins/astral.py#L72-L73

For the most part this does just fine, but it leads to ugly lines in embeds occasionally - and more importantly it can break markdown links provided by the ruff output

image

Basic Example

Make the chunking "smarter" to not break lines at awkward places

Drawbacks and Impact

No response

Unresolved questions


[!NOTE]
We utilize Polar.sh to engage in regular as well as pledge-based > sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.

Fund with Polar