w601sxs / BotsHisName

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BotsHisName Instructions

Pre-requisites

  1. ngrok
  2. node
  3. Ringcentral Developer account (Change .env file propoerties)
  4. Wolfram Alpha API account (Change parameters in code)

Steps In words

  1. clone my repository
  2. Enter downloaded directory
  3. Install dependencies
  4. Start ngrok server on port 4390
  5. Run bot
  6. Chat on glip!

Steps In code

  1. git clone https://github.com/w601sxs/BotsHisName.git
  2. cd BotsHisName
  3. npm install
  4. ngrok.exe http 4390
  5. node glip_bot.js
  6. Chat on glip!

Usage

question approximate pi to 6 digits

question how many molecules are in 10 grams of ATP

question gamma(x) integral representation

question 32 coin tosses

question cubic fit 20.9,23.2,26.2,26.4,16.3,-12.2,-60.6,-128.9

question when was the airbag invented?

question stock MSFT,AAPL,GOOG

question what is the relativistic momentum of an electron with speed=0.8c

question NACA 3012 airfoil

question what is the total length of all roads in germany?

question what is the distance between earth and neptune in lightyears

question tell me a physics joke

Botkit - Building Blocks for Building Bots

npm David npm bitHound Overall Score Slack Status

Botkit is the leading developer tool for building chat bots, apps and custom integrations for major messaging platforms.

Botkit offers everything you need to design, build and operate an app:

Plus, Botkit works with all the NLP services (like Microsoft LUIS and IBM Watson), can use any type of database you want, and runs on almost any hosting platform.

Install Botkit

Botkit Studio

Botkit Studio is a dashboard and IDE designed to super-charge Botkit. It includes a web-based interface for building and managing dialog, an activity console, third party integrations, and advanced analytics tools like customer segmenting, conversion funnels, and user retention metrics.

Sign up for a free Botkit Studio account, and it will guide you through the process to create, configure and deploy your Botkit app!

Sign up for Botkit Studio

Remix on Glitch

Want to dive right in? Remix one of our starter kits on Glitch. You'll start with a fully functioning app that you can edit and run from the browser!

Remix on Glitch

Command Line Interface

The best way to get started locally with Botkit is by installing our command line tool, and using it to create a new Botkit project. This will install and configure a starter kit for you!

The Slack starter kit contains everything you need to create a multi-team Slack application, suitable for internal use or submission to Slack's app store.

Remix on Glitch

Build a bot inside Cisco Spark's collaboration and messaging platform. Bots built with the starter kit are ready to submit to Cisco Spark's Depot app store.

Remix on Glitch

The Facebook starter kit contains all the code necessary to stand up a Facebook bot on either Facebook Messenger, or Facebook Work Chat. With just a few pieces of configuration, set up a bot that automatically responds to messages sent to your Facebook page.

Remix on Glitch

If you intend to create a bot that lives in Glip, follow these instructions for configuring your Glip bot.

If you intend to create a bot that lives inside a Twilio IP Messaging client, follow these instructions for configuring your app.

Remix on Glitch

npm install -g botkit
botkit new

Start from Scratch

You can also add Botkit into an existing Node application.

First, add it to your project:

upstream/master

npm install --save botkit

Then, add Botkit to your application code:

var Botkit = require('botkit');

var controller = Botkit.slackbot(configuration);

controller.hears('hello','direct_message', function(bot, message) {
    bot.reply(message,'Hello yourself!');
});

Review the documentation to learn how to configure Botkit's controller to work with the messaging platform of your choice.

Build Your Bot

The goal of Botkit is to make it easier and more fun to build software that talks and works like a robot! Building a bot should feel cool, and not too technically complicated.

Botkit handles all the nitty gritty details like API calls, session management and authentication, allowing you to focus on building COOL FEATURES for your bot using middleware and event handlers.

The toolkit is designed to provide meaningful building blocks for creating conversational user interfaces - with functions like hears(), ask(), and reply() that do what they say they do.

Hearing Keywords

Most bots do their thing by listening for keywords, phrases or patterns in messages from users. Botkit has a special event handler called hears() that makes it easy to configure your bot to listen for this type of trigger.

controller.hears(['string','pattern .*',new RegExp('.*','i')],'message_received,other_event',function(bot, message) {

  // do something!
  bot.reply(message, 'I heard a message.')

});

Read more about hearing things ›

Responding to Events

Bots can respond to non-verbal events as well, like when a new user joins a channel, a file gets uploaded, or a button gets clicked. These events are handled using an event handling pattern that should look familiar. Most events in Botkit can be replied to like normal messages.

controller.on('channel_join', function(bot, message) {

  bot.reply(message,'Welcome to the channel!');

});

See a full list of events and more information about handling them ›

Middleware

In addition to taking direct action in response to a certain message or type of event, Botkit can also take passive action on messages as they move through the application using middlewares. Middleware functions work by changing messages, adding new fields, firing alternate events, and modifying or overriding the behavior of Botkit's core features.

Middleware can be used to adjust how Botkit receives, processes, and sends messages. Here is a list of available middleware endpoints.

// Log every message recieved
controller.middleware.receive.use(function(bot, message, next) {

  // log it
  console.log('RECEIVED: ', message);

  // modify the message
  message.logged = true;

  // continue processing the message
  next();

});

// Log every message sent
controller.middleware.send.use(function(bot, message, next) {

  // log it
  console.log('SENT: ', message);

  // modify the message
  message.logged = true;

  // continue processing the message
  next();

});

Full Documentation

Community & Support

Join our thriving community of Botkit developers and bot enthusiasts at large. Over 6500 members strong, our open Slack group is the place for people interested in the art and science of making bots. Come to ask questions, share your progress, and commune with your peers!

You can also find help from members of the Botkit team in our dedicated Cisco Spark room!

We also host a regular meetup and annual conference called TALKABOT. Come meet and learn from other bot developers! Full video of our 2016 event is available on Youtube.

About Botkit

Botkit is a product of Howdy.ai.

Want to contribute? Read the contributor guide

Botkit is released under the MIT Open Source license

About


Languages

Language:JavaScript 100.0%