timoniq / telegrinder

Modern visionary telegram bot framework
MIT License
31 stars 5 forks source link

improve the way the Variative field is passed #149

Closed timoniq closed 1 month ago

timoniq commented 1 month ago

rn if you need to pass some dataclass with a variative field u have to do it in a VERY ugly way

await callback.edit_media(
    caption=text,
    media=InputMediaPhoto("photo", Variative[InputFile, str](url))
)

something must be done about this..

luwqz1 commented 1 month ago

maybe it's worth making a transfer issue to fntypes?

timoniq commented 1 month ago

maybe it's worth making a transfer issue to fntypes?

Still don't know if its going to be an fntypes-based type change or a bunch of regenerated type models for inputs. Hence the problem is represented via input model I'll keep it here