
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
clevertype
Advanced tools
An extensive Javascript/Typescript wrapper for the cleverbot API
Get your Cleverbot API key here
npm install --save clevertype
With typescript
import {Cleverbot} from "clevertype"
const cleverbot: Cleverbot = new Cleverbot('api-key');
cleverbot.say('come crawling faster').then((response : string) => {
console.log(response); // => 'obey your master!'
});
With javascript
const Cleverbot = require('clevertype').Cleverbot;
let cleverbot = new Cleverbot('api-key');
cleverbot.say('you should have known').then(response => {
console.log(response); // => 'the price of evil'
});
Coordinate multiple conversations between users without losing context
cleverbot.say('hey there', 'john');
// new user = new conversation
cleverbot.say('hi friend', 'alexa');
// new user = new conversation
cleverbot.say('how are you', 'john');
// john speaking again
If you're using a version before 1.1.3 make sure to update it as a dependency was updated to prevent random crashes.
Emotion: Controls how random cleverbot's responses are going to be, 0 = relevant, 100 = wtf
Engagement: Controls the shyness of the responses, 0 = super shy, 100 = outgoing
Regard: Controls how self centered her responses are going to be. Usually makes her ruder and ends up not caring about the input as much. 0 = total asshole, 100 = nice boi
// all take in a number from 0 to 100
cleverbot.setEmotion(100);
cleverbot.setEngagement(100);
cleverbot.setRegard(0);
console.log(cleverbot.mood); // => {emotion: 100, engagement: 100, regard: 0}
You can pass in mood settings directly from the constructor as well
import {Cleverbot, Config} from 'clevertype'
const config : Config = {
apiKey: 'your-api-key-here',
mood: {
emotion: 10,
engagement: 40,
regard: 100,
}
};
const cleverbot = new Cleverbot(config);
Clevertype also logs the number of calls you make per session
let calls : number = cleverbot.callAmount;
2.0.0 - Now supporting multi user mode which lets you coordinate conversations among multiple users with just an id.
cleverbot.mood
is now cleverbot.getMood()
As useful as it would be, currently cleverbot does not return and information on the remaining API calls for your account, to track that you would have to implement some sort of persistent database yourself.
FAQs
An extensive Javascript/Typescript API wrapper for Cleverbot
We found that clevertype demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.