I propose giving users ability to use shortcut methods like .answer(), .reply() and .forward() on any compatible model, not just update models in particular.
At the moment I don't know how exactly it's going to work. I don't want to violate integrity of types generated from schema. One way to go about this is to implement some sort of mixin that would patch the model in question.
Pseudocode
@bot.on.callback_query()
async def handler(cq: CallbackQuery) -> None:
# Before this feature, you'd have to write this much
# verbose code
await cq.ctx_api.delete_message(
cq.message.message_id, cq.message.chat.id
)
# After this feature gets implemented, the amount of code
# it takes to achieve the same result becomes much lower
await cq.message.delete()
Description
I propose giving users ability to use shortcut methods like
.answer()
,.reply()
and.forward()
on any compatible model, not just update models in particular.At the moment I don't know how exactly it's going to work. I don't want to violate integrity of types generated from schema. One way to go about this is to implement some sort of mixin that would patch the model in question.
Pseudocode