Socket
Socket
Sign inDemoInstall

cleverbot.io

Package Overview
Dependencies
47
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cleverbot.io

A node.js client for cleverbot.io


Version published
Weekly downloads
283
increased by32.24%
Maintainers
1
Install size
3.72 MB
Created
Weekly downloads
 

Readme

Source

cleverbot.io

npm status build status dependency status

To install this package, simply enter the following in your console

npm install --save cleverbot.io

Note: It is a good practice to include --save to add this to your dependencies in your package.json

Before using this module, please get your API keys at http://cleverbot.io/keys

To initialize cleverbot, require the module, then create a new instance of cleverbot

var cleverbot = require("cleverbot.io"),
bot = new cleverbot("YOUR_API_USER", "YOUR_API_KEY");

cleverbot.io allows you to save cleverbot sessions to access later If you've already created a session previously, simply add the following code to reference it

bot.setNick("sessionname")

To create or access a cleverbot session, start with the following

bot.create(function (err, session) {
  // session is your session name, it will either be as you set it previously, or cleverbot.io will generate one for you
  
  // Woo, you initialized cleverbot.io.  Insert further code here
});

Now querying cleverbot is simple, you pass the text to the .ask() method

bot.ask("Just a small town girl", function (err, response) {
  console.log(response); // Will likely be: "Living in a lonely world"
});

Well, that's it for now! Happy hacking!

Cleverbot.io is free and open source, and will remain so.

Keywords

FAQs

Last updated on 04 Jun 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc