How to get response using "event.reply"?

#1

This is my content.yml file

welcome:
  - Hello, Sheel!
  - I am a simple bot created on Botpress
  - I don't do anything else, so goodbye for now!

render.js is empty

module.exports = {}

In index.js I am trying to do this.


var event = require('events');
const {
  contentElements,
  contentRenderers,
  actions: builtinActions,
  setup: setupBuiltins
} = require('@botpress/builtins')

const registerCustom = require('./custom')

module.exports = async bp => {
  // This bot template includes a couple of built-in elements and actions
  // Please see the "@botpress/builtins" package to know more
  await registerBuiltin(bp)

  // Register custom actions, elements and renderers
  await registerCustom(bp)
  //bp.dialogEngine.registerFunctions(actions)


  // Train the NLU model if using the Native NLU Engine
  if (bp.nlu && bp.nlu.provider && bp.nlu.provider.name === 'native') {
    await bp.nlu.provider.sync()
  }

  const webchat = {
    botName: 'Basic',
    botAvatarUrl: null, // You can provide a URL here
    botConvoTitle: 'Botpress Basic Webchat Bot',
    botConvoDescription: "Hello, I'm a Botpress bot!",
    backgroundColor: '#ffffff',
    textColorOnBackground: '#666666',
    foregroundColor: '#000000',
    textColorOnForeground: '#ffffff'
  }

  bp.createShortlink('chat', '/lite', {
    m: 'channel-web',
    v: 'fullscreen',
    options: JSON.stringify({ config: webchat })
  })

  bp.logger.info(`------------`)
  bp.logger.info(`Webchat available at ${bp.botfile.botUrl}/s/chat`)
  bp.logger.info(`------------`)

  ////////////////////////////
  /// Conversation Management
  ////////////////////////////

  // All events that should be processed by the Flow Manager
  bp.hear({ type: /bp_dialog_timeout|text|message|quick_reply/i }, (event, next) => {
    event.reply("#welcome");

//mysql
    var con =bp.mySqlDB = require('knex')({
    client: 'mysql',
    connection: {
    host: 'db4free.net',
    user: 'admin_me1',
    password: 'Testing_1234',
    database: 'csv_db1'
  },
  });

  con.from('TABLE_2').select("*")
    .then((rows) => {
        for (row of rows) {
            //console.log(`${row['COL_1']}`);
        }

    }).catch((err) => { console.log( err); throw err })
    .finally(() => {
        con.destroy();
    });



process.on('SIGINT', () => bp.mySqlDB.destroy())
    bp.dialogEngine.processMessage(event.sessionId || event.user.id, event).then()

  })
}

async function registerBuiltin(bp) {
  await setupBuiltins(bp)

  // Register all the built-in content elements
  // Such as Carousel, Text, Choice etc..
  for (const schema of Object.values(contentElements)) {
    await bp.contentManager.loadCategoryFromSchema(schema)
  }

  await bp.contentManager.recomputeCategoriesMetadata()

  // Register all the renderers for the built-in elements
  for (const renderer of Object.keys(contentRenderers)) {
    bp.renderers.register(renderer, contentRenderers[renderer])
  }

  // Register all the built-in actions
  bp.dialogEngine.registerActions(builtinActions)
}


I am not getting response from my chatbot
please help me.