import code from './main.converse'
export default {
code,
formats: {
quickReplies(text, [actions]) {
return {
text,
actions
}
},
image(text, [image]) {
return {
text,
image
}
}
}
}
@Event('start')
start() {
@Format('image', 'test.com')
@Format('quickReplies', ['yes', 'no'])
> test
}
{
image: { text: 'test', image: 'test.com' },
quickReplies: {
text: { text: 'test', image: 'test.com' },
actions: [ 'yes', 'no' ]
}
}
import code from './main.converse'
export default {
code,
formats: {
quickReplies(text, [actions]) {
return {
text,
actions
}
},
image(text, [image]) {
return {
text,
image
}
}
},
mergeMultiFormats: true
}
@Event('start')
start() {
@Format('image', 'test.com')
@Format('quickReplies', ['yes', 'no'])
> test
}
{
text: 'test',
actions: [ 'yes', 'no' ],
image: 'test.com'
}