Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Message::nonce a serde_json::Value
Nonces can actually be almost anything - including booleans - so just use a Value to represent it since very few users will need it. This fixes errors like: ``` WARN:serenity::internal::ws_impl: (╯°□°)╯︵ ┻━┻ Error decoding: {"t":"MESSAGE_CREATE","s":12187872,"op":0,"d":{"type":0,"tts":false,"timestamp":"2017-06-01T01:00:00.000000+00:00","pinned":false,"nonce":"","mentions":[{"username":"redacted","id":"redacted","discriminator":"redacted","avatar":"redacted"}],"mention_roles":[],"mention_everyone":false,"id":"redacted","embeds":[],"edited_timestamp":null,"content":"redacted","channel_id":"redacted","author":{"username":"redacted","id":"redacted","discriminator":"redacted","bot":true,"avatar":"redacted"},"attachments":[]}} ERROR:serenity::client: Shard handler received err: Json(ErrorImpl { code: Message("Unknown i64 value: "), line: 0, column: 0 }) ``` and: ``` WARN:serenity::internal::ws_impl: (╯°□°)╯︵ ┻━┻ Error decoding: {"t":"MESSAGE_CREATE","s":1001192,"op":0,"d":{"type":0,"tts":false,"timestamp":"2017-06-01T01:01:01.000000+00:00","pinned":false,"nonce":true,"mentions":[],"mention_roles":[],"mention_everyone":false,"id":"redacted","embeds":[],"edited_timestamp":null,"content":"bork","channel_id":"redacted","author":{"username":"redacted","id":"redacted","discriminator":"redacted","bot":true,"avatar":"redacted"},"attachments":[]}} ERROR:serenity::client: Shard handler received err: Json(ErrorImpl { code: Message("invalid type: boolean `true`, expected identifier"), line: 0, column: 0 }) ```
- Loading branch information