brainboxdotcc / DPP

C++ Discord API Bot Library - D++ is Lightweight and scalable for small and huge bots!
https://dpp.dev/
Apache License 2.0
1.06k stars 161 forks source link

FIX: QOL: non fatal utf8 handling. #1147

Closed braindigitalis closed 4 months ago

braindigitalis commented 4 months ago

The user can't catch these errors. We should be much more forgiving on what we accept because UTF8 is a total nightmare for end users. If there is something really bad we should let discord API report it as we do for other stuff. nlohmann will now replace invalid utf8 with � instead of outright throwing and reconnecting the shard. This is much more durable, stable, and user friendly.

Code change checklist

I have added a unit test for this.

netlify[bot] commented 4 months ago

Deploy Preview for dpp-dev ready!

Name Link
Latest commit b371934d4735398acfda564b27366a043aab6242
Latest deploy log https://app.netlify.com/sites/dpp-dev/deploys/663e05d814b76f0008b5afbf
Deploy Preview https://deploy-preview-1147--dpp-dev.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.