Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cleverbot.js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cleverbot.js

A Node.js Cleverbot API wrapper library. Go make a chat bot in a flash!

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cleverbot.js

A Node.js Cleverbot API wrapper library. Go make a chat bot in a flash!

It supports both cleverbot.com and cleverbot.io

GitHub release Dependencies Known Vulnerabilities license Say Thanks!

Table of Contents

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. I recommend installing the latest LTS version of Node.js.

Installation is done using the npm install command:

$ npm install cleverbot.js --save

Usage

Constructor

new Cleverbot.com(options);
ParameterTypeOptionalDefaultDescription
optionsObject-The options for initializing cleverbot.js
options.APIKeyString-The API key that you got from the cleverbot website
options.preserveStateBooleanfalseWhether to preserve the state of the conversations.
Example
const Cleverbot = require('cleverbot.js');
let options = {
  APIKey: 'CFDoi4234falFOFaSfwepxXhBRW',
  preserveState: true
};
cleverbot = new Cleverbot.com(options);

cleverbot.write('Hi how\'re you?').then(response => {
  console.log(response.output); // Fine, how're you?
}).catch(e => {
  console.error(e);
});

Constructor

new Cleverbot.io(options);
ParameterTypeOptionalDefaultDescription
optionsObject-The options for initializing cleverbot.js
options.APIUserString-The API user that you got from the cleverbot website
options.APIKeyString-The API key that you got from the cleverbot website
Example
const Cleverbot = require('cleverbot.js');
let options = {
  APIUser: 'FaSfwepxX34falFO',
  APIKey: 'CFDoi4234falFOFaSfwepxXhBRW'
};
cleverbot = new Cleverbot.io(options);

cleverbot.init().then(nick => {
  cleverbot.write('Hi how\'re you?', nick).then(response => {
    console.log(response.output); // Good, and you?
  }).catch(e => {
    console.error(e);
  });
}).catch(e => {
  console.error(e);
})

Contributors

List of all contributors

License

GPL-3.0

If you liked this project you can ⭐ Star it on GitHub to show your love and/or send a thank you note.

Keywords

FAQs

Package last updated on 04 Sep 2018

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc