SpaceManiac / discord-rs

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

Discord::get_message always fails due to missing `nonce` field #115

Closed anna-is-cute closed 7 years ago

anna-is-cute commented 7 years ago

When using Discord::get_message, no matter what channel and message are passed to the function, the same error is always given:

Json(
    ErrorImpl {
        code: Message(
            "missing field `nonce`"
        ),
        line: 1,
        column: 680
    }
)

Seems like the best way to fix this would be to add #[serde(default)] to the nonce field.

Edit: Can confirm that adding #[serde(default)] fixes this.