BotKit is not working for me


(Eiaste Support) #1

While using botkit, i am getting below error

Unhandled rejection TypeError: Cannot read property ‘__payloadClass’ of null
at /home/an26325/BotKit-master/lib/sdk/lib/requestStore.js:23:54
at tryCatcher (/home/an26325/BotKit-master/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:691:18)
at Promise._fulfill (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:636:18)
at Promise._resolveCallback (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:431:57)
at Promise._settlePromiseFromHandler (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:522:17)
at Promise._settlePromise (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:691:18)
at Promise._fulfill (/home/an26325/BotKit-master/node_modules/bluebird/js/release/promise.js:636:18)
at Command.callback (/home/an26325/BotKit-master/node_modules/bluebird/js/release/nodeback.js:42:21)
at normal_reply (/home/an26325/BotKit-master/node_modules/redis/index.js:714:21)
at RedisClient.return_reply (/home/an26325/BotKit-master/node_modules/redis/index.js:816:9)


(sadhvi chandra) #2

We see you support ticket from you on this, which is closed.

Here are support links which are shared.

Please refer to the examples provided in the documentation.
https://developer.kore.ai/docs/bots/sdks/kore-ai-botkit-sdk-tutorial/

Asynchronous: https://github.com/Koredotcom/BotKit/blob/master/BookACab.js
Use sdk.respondToHook(data); along with sdk.saveData(requestId, data).

Synchronous:


Use sdk.sendBotMessage(data, callback); to respond as bot along with proper callback.