Discord sends incomplete CurrentUser structures for USER_UPDATE events in certain cases. This change makes most of the fields Options, and changes the state logic to retain the prior value of the field if it is missing in the update.
I've left id, username, and discriminator alone as I suspect these are the most commonly used fields (and thus would have the most compatibility impact if changed), and they do seem to be present, at least for the messages I've seen so far.
Discord sends incomplete CurrentUser structures for USER_UPDATE events in certain cases. This change makes most of the fields
Option
s, and changes the state logic to retain the prior value of the field if it is missing in the update.I've left id, username, and discriminator alone as I suspect these are the most commonly used fields (and thus would have the most compatibility impact if changed), and they do seem to be present, at least for the messages I've seen so far.
Closes #139.