Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async sendSuggestedActions(turnContext) {
const cardActions = [
{
type: ActionTypes.PostBack,
title: 'Red',
value: 'Red',
image: 'https://via.placeholder.com/20/FF0000?text=R',
imageAltText: 'R'
},
{
type: ActionTypes.PostBack,
title: 'Yellow',
value: 'Yellow',
image: 'https://via.placeholder.com/20/FFFF00?text=Y',
imageAltText: 'Y'
},
{
type: ActionTypes.PostBack,
title: 'Blue',
value: 'Blue',
{
type: ActionTypes.PostBack,
title: 'Red',
value: 'Red',
image: 'https://via.placeholder.com/20/FF0000?text=R',
imageAltText: 'R'
},
{
type: ActionTypes.PostBack,
title: 'Yellow',
value: 'Yellow',
image: 'https://via.placeholder.com/20/FFFF00?text=Y',
imageAltText: 'Y'
},
{
type: ActionTypes.PostBack,
title: 'Blue',
value: 'Blue',
image: 'https://via.placeholder.com/20/0000FF?text=B',
imageAltText: 'B'
}
];
var reply = MessageFactory.suggestedActions(cardActions, 'What is the best color?');
await turnContext.sendActivity(reply);
}
}