Qlik Community

Qlik Server Side Extensions Discussions

Discussion Board for collaboration on Server-Side Extensions and Advanced Analytics Integration.

Highlighted
ksmahmood
New Contributor

Can someone help me set up the Qlik Bot

I followed the instructions in the github page but I'm getting this weird error when I try running `gulp`

$ gulp

[11:14:47] Using gulpfile C:\QlikBot\QlikBotNode\gulpfile.js

[11:14:47] Starting 'vendor-js'...

[11:14:47] Starting 'vendor-css'...

[11:14:47] Starting 'server'...

[11:14:47] Finished 'server' after 283 ms

[11:14:47] [nodemon] 1.18.4

[11:14:47] [nodemon] to restart at any time, enter `rs`

[11:14:47] [nodemon] watching: app/server/server.js app/server/app.js C:\QlikBot\QlikBotNode\app\server\routes/**/* C:\QlikBot\QlikBotNode\app\server\models/**/* C:\QlikBot\QlikBotNode\app\public/**/*

[11:14:47] [nodemon] starting `node app/server/server.js`

[11:14:47] Finished 'vendor-css' after 378 ms

restarted!

[11:14:47] [nodemon] restarting due to changes...

restarted!

[11:14:47] [nodemon] restarting due to changes...

[11:14:47] Finished 'vendor-js' after 613 ms

[11:14:47] Starting 'default'...

[11:14:47] Finished 'default' after 39 μs

[11:14:47] [nodemon] starting `node app/server/server.js`

error: uncaughtException: 401: Bot Token is required date=Wed Oct 24 2018 11:14:48 GMT-0400 (Eastern Daylight Time), pid=16112, uid=null, gid=null, cwd=C:\QlikBot\QlikBotNode, execPath=C:\Program Files\nodejs\node.exe, version=v8.12.0, argv=, rss=38993920, heapTotal=20791296, heapUsed=11219408, external=55221, loadavg=[0, 0, 0], uptime=166512.8684178, trace=[column=13, file=C:\QlikBot\QlikBotNode\node_modules\telegraf\core\network\client.js, function=Telegram.callApi, line=238, method=callApi, native=false, column=17, file=C:\QlikBot\QlikBotNode\node_modules\telegraf\telegram.js, function=Telegram.getUpdates, line=28, method=getUpdates, native=false, column=19, file=C:\QlikBot\QlikBotNode\node_modules\telegraf\telegraf.js, function=Telegraf.fetchUpdates, line=129, method=fetchUpdates, native=false, column=12, file=C:\QlikBot\QlikBotNode\node_modules\telegraf\telegraf.js, function=Telegraf.startPolling, line=73, method=startPolling, native=false, column=5, file=C:\QlikBot\QlikBotNode\app\server\routes\api\sense-bot\telegram.js, function=null, line=383, method=null, native=false, column=30, file=module.js, function=Module._compile, line=653, method=_compile, native=false, column=10, file=module.js, function=Module._extensions..js, line=664, method=.js, native=false, column=32, file=module.js, function=Module.load, line=566, method=load, native=false, column=12, file=module.js, function=tryModuleLoad, line=506, method=null, native=false, column=3, file=module.js, function=Module._load, line=498, method=_load, native=false], stack=[Error: 401: Bot Token is required,     at Telegram.callApi (C:\QlikBot\QlikBotNode\node_modules\telegraf\core\network\client.js:238:13),     at Telegram.getUpdates (C:\QlikBot\QlikBotNode\node_modules\telegraf\telegram.js:28:17),     at Telegraf.fetchUpdates (C:\QlikBot\QlikBotNode\node_modules\telegraf\telegraf.js:129:19),     at Telegraf.startPolling (C:\QlikBot\QlikBotNode\node_modules\telegraf\telegraf.js:73:12),     at Object.<anonymous> (C:\QlikBot\QlikBotNode\app\server\routes\api\sense-bot\telegram.js:383:5),     at Module._compile (module.js:653:30),     at Object.Module._extensions..js (module.js:664:10),     at Module.load (module.js:566:32),     at tryModuleLoad (module.js:506:12),     at Function.Module._load (module.js:498:3)]

[11:14:48] [nodemon] clean exit - waiting for changes before restart

Any help would be much appreciated.

Tags (2)
2 Replies
Sky8lade
New Contributor

Re: Can someone help me set up the Qlik Bot

Hi @ksmahmood Did you manage to find the problem? I too get this error.

Employee
Employee

Re: Can someone help me set up the Qlik Bot

Need to setup the telegram token, either as ENV or hard code it in

 

https://github.com/qlik-bots/QlikBotNode/blob/master/app/server/routes/api/sense-bot/telegram.js#L17