What is hubot?
Hubot is a chat bot built on the Node.js platform that can be easily extended with scripts to automate tasks, provide information, and interact with users in chat rooms. It is designed to be deployed on various chat platforms like Slack, Discord, and others, allowing teams to automate workflows and improve communication.
What are hubot's main functionalities?
Automated Responses
This feature allows Hubot to listen for specific phrases or commands in chat and respond automatically. The code sample demonstrates how Hubot can be programmed to respond with a greeting when a user says 'hello'.
module.exports = (robot) => { robot.respond(/hello/i, (res) => { res.send('Hello! How can I assist you today?'); }); };
Task Automation
Hubot can be used to automate tasks by listening for specific commands and executing predefined actions. The code sample shows how Hubot can be set up to remind users of tasks at specified times.
module.exports = (robot) => { robot.hear(/remind me to (.*) at (.*)/i, (res) => { const task = res.match[1]; const time = res.match[2]; res.send(`Okay, I will remind you to ${task} at ${time}.`); }); };
Integration with APIs
Hubot can integrate with external APIs to fetch and provide information. The code sample illustrates how Hubot can be used to get weather information for a specified location by calling an external weather API.
module.exports = (robot) => { robot.respond(/weather in (.*)/i, async (res) => { const location = res.match[1]; const weather = await getWeather(location); res.send(`The weather in ${location} is ${weather}.`); }); };
Other packages similar to hubot
botpress
Botpress is an open-source conversational AI platform that allows developers to build, deploy, and manage chatbots. Unlike Hubot, which is more script-based and focused on chat automation, Botpress offers a more comprehensive platform with a visual interface for designing complex conversational flows and integrating machine learning models.
telegraf
Telegraf is a library for building Telegram bots using Node.js. It provides a simple and flexible API for creating bots that can interact with users on Telegram. While Hubot is designed to work with multiple chat platforms, Telegraf is specifically tailored for Telegram, offering more specialized features for that platform.
slack-bolt
Slack Bolt is a framework for building Slack apps using JavaScript. It provides tools and APIs to create interactive Slack applications with ease. Compared to Hubot, which can be used on various platforms, Slack Bolt is specifically optimized for Slack, offering deeper integration and more advanced features for Slack app development.
![Build Status: Window](https://github.com/hubotio/hubot/actions/workflows/nodejs-windows.yml/badge.svg)
Hubot
Hubot is a framework to build chat bots, modeled after GitHub's Campfire bot of the same name, hubot.
He's pretty cool. He's extendable with scripts and can work
on many different chat services.
This repository provides a library that's distributed by npm
that you
use for building your own bots. See the documentation
for details on getting up and running with your very own robot friend.
In most cases, you'll probably never have to hack on this repo directly if you
are building your own bot. But if you do, check out CONTRIBUTING.md
License
See the LICENSE file for license rights and limitations (MIT).