diff --git a/packages/botkit/src/conversation.ts b/packages/botkit/src/conversation.ts index b288148a4..7cb921aee 100644 --- a/packages/botkit/src/conversation.ts +++ b/packages/botkit/src/conversation.ts @@ -762,6 +762,11 @@ export class BotkitConversation extends Dialog { let outgoing; let text = ''; + // If text is a function, call the function to get the actual text value. + if (typeof line.text === 'function') { + text = await line.text(vars); + } + // if the text is just a string, use it. // otherwise, if it is an array, pick a random element if (line.text && typeof(line.text)=='string') {