src/middlewares/callback.js
function setCallback (action, callbackContext = null, callbackText = null) {
        const callbackAction = this.toAbsoluteAction(action);

        this.setState({
            [ACTION]: callbackAction,
            [CONTEXT]: callbackContext || DEFAULT,
            [TEXT]: callbackText
        });

        return this;
    }
function setCallback (action, callbackContext = null, callbackText = null) {
        const callbackAction = this.toAbsoluteAction(action);

        this.setState({
            [ACTION]: callbackAction,
            [CONTEXT]: callbackContext || DEFAULT,
            [TEXT]: callbackText
        });

        return this;
    }
function setCallback ( action , callbackContext = null , callbackText = null ) { const callbackAction = this . toAbsoluteAction ( action ) ; this . setState ( { [ ACTION ] : callbackAction , [ CONTEXT ] : callbackContext || DEFAULT , [ TEXT ] : callbackText } ) ; return this ; }
Sets action, where to go back, when user responds with text

@param {string} action - relative or absolute action (usualy current action)
@param {string|null} [callbackContext] - context of callback
@param {string|null} [callbackText] - custom text response
@returns {this}
@alias module:callbackMiddleware
@deprecated - use res.runBookmark()
@typicalname res
@example

bot.use('myAction', (req, res) => {
res.setCallback('myAction'); // return back
});
Sets action where to go back when user responds with text