We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Steps to reproduce Run the following sample code (https://hazel-jazzy-peach.glitch.me/):
// __ __ ___ ___ // |__) / \ | |__/ | | // |__) \__/ | | \ | | // This is the main file for the starter-webex bot. // Import Botkit's core features const { Botkit } = require('botkit'); const { BotkitCMSHelper } = require('botkit-plugin-cms'); // Import a platform-specific adapter for webex. const { WebexAdapter } = require('botbuilder-adapter-webex'); const { MongoDbStorage } = require('botbuilder-storage-mongodb'); const common = require('./common'); // Load process.env values from .env file require('dotenv').config(); let storage = null; if (process.env.MONGO_URI) { storage = new MongoDbStorage({ url : process.env.MONGO_URI, }); } const adapter = new WebexAdapter({ // REMOVE THIS OPTION AFTER YOU HAVE CONFIGURED YOUR APP! enable_incomplete: true, access_token: process.env.access_token, public_address: process.env.public_address, secret: process.env.secret }) const controller = new Botkit({ webhook_uri: '/api/messages', adapter: adapter, storage }); controller.spawn().then(bot => { common.bot = bot; bot.api.messages.create({ text: "beep, boop!", toPersonEmail: 'ABC.DEF@here.com' }); }); if (process.env.cms_uri) { controller.usePlugin(new BotkitCMSHelper({ cms_uri: process.env.cms_uri, token: process.env.cms_token, })); } controller.usePlugin({ name: 'webserver logger', init: function(botkit) { console.log('binding new express middleware'); botkit.webserver.use(function(req, res, next) { console.log('FIRE MIDDLEWARE'); console.log('> ', req.url, JSON.stringify(req.body, null, 2)); next(); }); } }); // Once the bot has booted up its internal services, you can use them to do stuff. controller.ready(() => { // load traditional developer-created local custom feature modules controller.loadModules(__dirname + '/features'); /* catch-all that uses the CMS to trigger dialogs */ if (controller.plugins.cms) { controller.on('message,direct_message', async (bot, message) => { let results = false; results = await controller.plugins.cms.testTrigger(bot, message); if (results !== false) { // do not continue middleware! return false; } }); } }); controller.webserver.get('/', (req, res) => { res.send(`This app is running Botkit ${ controller.version }.`); });
Expected behavior: No error generated, and an instance of the bot can be used to call bot.api.messages.create function.
Even with this error bot responds to added features.
Describe your issue here, include as much detail as necessary to reproduce the issue or implement a missing functionality.
botkit/packages/botkit/src/core.ts
Line 1080 in 77e309b
The text was updated successfully, but these errors were encountered:
Fixed in 4.9
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Steps to reproduce
Run the following sample code (https://hazel-jazzy-peach.glitch.me/):
Expected behavior:
No error generated, and an instance of the bot can be used to call bot.api.messages.create function.
Even with this error bot responds to added features.
Describe your issue here, include as much detail as necessary to reproduce the issue or implement a missing functionality.
-I had a chat with @benbrown and this bug is acknowledged. This bug is related to line
botkit/packages/botkit/src/core.ts
Line 1080 in 77e309b
The text was updated successfully, but these errors were encountered: