Lonami / grammers

(tele)gramme.rs - use Telegram's API from Rust
https://t.me/gramme_rs
Apache License 2.0
517 stars 102 forks source link

add `attrs` accessor #247

Open vnghia opened 2 months ago

vnghia commented 2 months ago

For some reasons, one might want to access the inner type language field since the high-level api grammers-client haven't caught up yet. In my case, I want to access the InputStickerSet of the Sticker struct.

I saw that we already have a unstable_raw feature so how about adding something like raw_tl function. I am willing to contribute if that makes sense.

Lonami commented 2 months ago

Reusing the unstable_raw feature to expose raw types is the way to go. Yes please, send a PR. Add what you need under the feature. Although we should probably return the entire raw media, not just attrs.