Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@exoplay/exobot
Advanced tools
An ES6+ chatbot. Requires Node ^6.2.
npm install --save @exoplay/exobot
const Log = require('log');
const { Exobot, adapters, plugins } = require('../exobot');
const { Help, Greetings } = plugins;
const BOT_ALIAS = '!e';
const BOT_NAME = 'exobot';
const HTTP_LISTENER_PORT = process.env.PORT || '8080';
const LOG_LEVEL = process.env.EXOBOT_LOG_LEVEL || Log.INFO;
const shell = adapters.Shell;
const bot = new Exobot(BOT_NAME, {
alias: BOT_ALIAS,
adapters: [
new shell(),
],
plugins: [
new Help(),
new Greetings(),
],
port: HTTP_LISTENER_PORT,
logLevel: LOG_LEVEL,
});
module.exports = bot;
$ node index.js
> Chat: hi, exobot
> exobot: hi, shell!
What did we do there?
index.js
Exobot
class, service adapters, and pluginsnode index.js
and interacted with the botThe easiest way to start is copy the example above - this will get you started with a chatbot with a shell adapter. The shell adapter will start an interactive console with which you can chat in a single "room"; Exobot will respond to messages that trigger plugins.
git init
(or source control initialization method of choice), then
npm init
to start up an NPM package. (You probably won't publish your bot
as its own package - but this will create a package.json
file that contains
your dependencies.)npm install --save @exoplay/exobot
to install the chatbot.index.js
.node index.js
. Chat with yourself for a while, then read on to learn
how to configure your chatbot, or even build your own plugins and adapters.Exobot is loosely based on hubot, for which the author has a great deal of admiration. Hubot is more user-friendly in many ways (autoloading scripts, for example, instead of requiring the user to write their own imports and configuration). In other ways, this flexibility can be limiting; it's easier to make a pure-js bot more efficient and testable (and the author thinks that ES6, rather than Coffeescript, is a more viable choice of language; plugin-writers can always choose to opt-in to Coffeescript and export a built file if they want.)
Additional thanks to the many, many Hubot script-writers that have provided a large base of existing scripts and adapters which were converted to Exobot. The original scripts' information has been preserved where scripts were converted rather than re-built.
MIT licensed. Copyright 2016 Exoplay, LLC. See LICENSE file for more details.
FAQs
a chatbox
We found that @exoplay/exobot 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.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.