Closed vffuunnyy closed 2 months ago
✏️ New feature description ✏️
Could you add a default value for the parse_mode parameter? This will reduce lines of code for developers.
🪄 Provide a minimal example 🪄
api = API(token=token, prase_mode=ParseMode.HTML) async def handler(m): await m.answer( HTMLFormatter(bold(italic("bold italic text!"))), ) # instead of async def handler(m): await m.answer( HTMLFormatter(bold(italic("bold italic text!"))), parse_mode=HTMLFormatter.PARSE_MODE, )
implemented in https://github.com/timoniq/telegrinder/commit/64ec2b3b6108ebb202e18f256c7dae28e19155e5
api = API(...) api.default_params["parse_mode"] = HTMLFormatter.PARSE_MODE
🚀 Feature Request 🚀
✏️ New feature description ✏️
Could you add a default value for the parse_mode parameter? This will reduce lines of code for developers.
🪄 Provide a minimal example 🪄