Have you considered adding annotations to help implement long polling by dispersing the functions? For example, in [Pyrogram](https://docs.pyrogram.org/), there are features like `@app.on_callback_query`, `@app.on_message`, ... I think these are very convenient functions.