SpaceManiac / discord-rs

Rust library for the Discord chat client API
MIT License
385 stars 94 forks source link

feat: Added support for nullable notes. #173

Closed MGlolenstine closed 1 year ago

MGlolenstine commented 2 years ago

While backupping friends, I've noticed that some of the notes were null. I've handled that possibility.

SpaceManiac commented 2 years ago

Is differentiating between the notes for a UserId being absent and being null actually useful in any way? Seems to me like the BTreeMap could exclude these entries rather than mapping to Option.

MGlolenstine commented 2 years ago

That is a good question. I did need to know if they've set the notes or not, so in that case, it was useful information and I do subjectively think that having more information is better than having the bare-minimum, but I do think you have a point as well.

I can change the PR if leaving them out is more appropriate.