Closed nmwael closed 1 year ago
Hi Nino,
All of the example bots will render their forms using adaptive cards. Claim Bot, Broadcast Bot are good ones to look at the code for - just check the examples part of the repo.
Generally, when Spring Bot needs to display a form, it creates one on-the-fly by reflectively examining the object being sent.
Whenever Spring Bot creates an adaptive card form (or any other template) it'll be output at runtime to stdout by default. This is useful because it allows you to capture that template and then load it up in a tool like this one: https://adaptivecards.io/designer/
You can customise the adaptive card template however you want and then save it into the src/main/resources/templates/teams directory of your bot.
Use the @Template annotation on the bean to tell Spring bot to use your template instead of generating one.
A good example of where this is done is the poll-bot in the tools directory. Take a look at Question.java
and see how it sets the template up.
Does that help?
thanks thats right on the spot!
Hi guys,
How can I use something like (adaptive-card) this:
https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference
Should I just instantiate it and return it in a chat method? Or ?