Botkit: Upgrade from V 0.7.0 to 4.5 does not work

Created on 5 Sep 2019  路  6Comments  路  Source: howdyai/botkit

After spending the time to upgrade from Botkit 0.7.0 to 4.5 my app no longer works. It seems to connect without error, but does not come online or respond to anything. Version 0.7.0 works fine with the same slack app, token and signing secret.

Am I missing something simple?

code:

    const slackAdapterOptions: SlackAdapterOptions = {
            botToken: auth.slackToken,
            clientSigningSecret: auth.slackSigningSecret,
            redirectUri: '' // why is this required?
        }) {

      const adapter = new SlackAdapter(slackAdapterOptions);
      const controller = new Botkit({
        adapter,
        webserver_middlewares: [],
        webhook_uri: '/api/messages',
      });


      controller.hears('hello','message', async(bot: BotWorker, message: BotkitMessage) => {
       console.log("word up!")
       await bot.reply(message,'I heard you say hello.');
      });
     controller.spawn();
help wanted

All 6 comments

Are you set up to use the events API? v4 does not have built-in support for the websocket connection to Slack.

That could be. Let me read up - Thanks.

Going to close this. We ended up forking 0.7.4 and updating the security vulnerabilities ourselves, because it was less effort and the old code actually works. I'm sorry to see what Microsoft has done.

Just migrated a project from 0.7.4 to 4.5 on Slack and it went great. The new library is much better and easier to use. I'm glad to see what Microsoft has done.

@jfelten, could you comment more on how you updated security vulnerabilities. I'm trying to upgrade my codebase (used botkit-starter-web to get started, at version 0.0.1, which depended on botkit 0.6.12, while remaining open source; also using watson-middleware-watson 1.8.2)

you can update dependencies by running npm audit -fix

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abinashmohanty picture abinashmohanty  路  4Comments

fieldcorbett picture fieldcorbett  路  4Comments

imjul1an picture imjul1an  路  3Comments

dfischer picture dfischer  路  4Comments

RafaelCosman picture RafaelCosman  路  4Comments