async def get_text(dialog_manager: DialogManager, **kwargs): selected = await get_selected(dialog_manager) text = dialog_manager.current_intent().data return { "selected": selected["selected"], "text": text if text is not None else "Отправьте мне текст рассылки", "now": datetime.now().isoformat(), }
async def get_data2(dialog_manager: DialogManager, **kwargs): return { "text": dialog_manager.current_intent().data, "now": datetime.now().isoformat(), }
async def get_image(dialog_manager: DialogManager, **kwargs): image_id = dialog_manager.current_intent().data return { "image_id": image_id if image_id is not None else "Прикрепите фотографию" }