Closed ratijas closed 7 years ago
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax(MissingField("first_name"), 1, 226)' …
i guess it's the problem of code auto-generation in telebot-derive crate.
telebot-derive
UPD: i think i found the root of the error. it's line 61 of objects.rs: pub forward_from_chat: Option<User>, it has to be Option<Chat> instead.
objects.rs
pub forward_from_chat: Option<User>,
Option<Chat>
Thanks, this is indeed wrong. It would be awesome if Telegram could export their protocol to JSON or something, then we could autogenerate the fields.
seems like tl schema is all json we could have :(
https://core.telegram.org/schema/json
i guess it's the problem of code auto-generation in
telebot-derive
crate.UPD: i think i found the root of the error. it's line 61 of
objects.rs
:pub forward_from_chat: Option<User>,
it has to beOption<Chat>
instead.