To add buttons to a message, you can add several actions to the application. Each action will be displayed on a button using a connector. Several attachments will be displayed in the carousel in the Facebook messenger. The following is an example of adding 3 messages to a message.
var reply = context.MakeMessage(); reply.Attachments = new List<Attachment>(); var actions = new List<Microsoft.Bot.Connector.Action>(); for (int i = 0; i < 3; i++) { actions.Add(new Microsoft.Bot.Connector.Action { Title = $"Button:{i}", Message = $"Action:{i}" }); } reply.Attachments.Add(new Attachment { Title = "Choose one:", Actions = actions }); await context.PostAsync(reply);
source share