How to use botbuilder-adapter-web - 1 common examples

To help you get started, we’ve selected a few botbuilder-adapter-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github howdyai / botkit / packages / testbot / bot.js View on Github external
// adapter.use(new SlackEventMiddleware());

// // Use SlackMessageType middleware to further classify messages as direct_message, direct_mention, or mention
// adapter.use(new SlackMessageTypeMiddleware());
// 
/* ----------------------------------------------------------------------
 *  __      __      ___.                        __           __   
 * /  \    /  \ ____\_ |__   __________   ____ |  | __ _____/  |_ 
 * \   \/\/   // __ \| __ \ /  ___/  _ \_/ ___\|  |/ // __ \   __\
 *  \        /\  ___/| \_\ \\___ (  <_> )  \___|    <\  ___/|  |  
 *   \__/\  /  \___  >___  /____  >____/ \___  >__|_ \\___  >__|  
 *        \/       \/    \/     \/           \/     \/    \/     
 * Configure the Websocket adapter
 * ----------------------------------------------------------------------
 */
const adapter = new WebAdapter({});

// const adapter = new FacebookAdapter({
//     // enable_incomplete: true,
//     // verify_token: process.env.FACEBOOK_VERIFY_TOKEN,
//     getAccessTokenForPage: async(team) => { console.log('GET TOKEN FOR TEAM', team); if (team === process.env.FACEBOOK_PAGE_ID) { return process.env.FACEBOOK_ACCESS_TOKEN } },
//     app_secret: process.env.FACEBOOK_APP_SECRET,
// })

// // emit events based on the type of facebook event being received
// adapter.use(new FacebookEventTypeMiddleware());


// const adapter = new HangoutsAdapter({
//     // enable_incomplete: true,
//     token: process.env.GOOGLE_TOKEN,
//     google_auth_params: {

botbuilder-adapter-web

Connect Botkit or BotBuilder to the Web

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis

Popular botbuilder-adapter-web functions