All Projects β†’ go-joe β†’ Joe

go-joe / Joe

Licence: bsd-3-clause
A general-purpose bot library inspired by Hubot but written in Go. πŸ€–

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Joe

Flottbot
A chatbot framework written in Go. All configurations are made in YAML files, or inside scripts written in your favorite language.
Stars: ✭ 175 (-58.03%)
Mutual labels:  bot, chatbot-framework, slack
Slacker
Slack Bot Framework
Stars: ✭ 495 (+18.71%)
Mutual labels:  bot, chat, slack
Groupbutler
This bot can help you in managing your group with rules, anti-flood, description, custom triggers, and much more!
Stars: ✭ 399 (-4.32%)
Mutual labels:  bot, chat
Botui
πŸ€– A JavaScript framework to create conversational UIs
Stars: ✭ 2,607 (+525.18%)
Mutual labels:  bot, chat
Hangouts Chat Samples
Chat Bot Samples for Google Chat.
Stars: ✭ 284 (-31.89%)
Mutual labels:  bot, chatbot-framework
Poshbot
Powershell-based bot framework
Stars: ✭ 410 (-1.68%)
Mutual labels:  bot, chatbot-framework
Phabulous
A Phabricator bot for Slack
Stars: ✭ 222 (-46.76%)
Mutual labels:  bot, slack
Workbase Server
Slack alternative, email integrated, build with Meteor
Stars: ✭ 284 (-31.89%)
Mutual labels:  chat, slack
Venom
Venom is the most complete javascript library for Whatsapp, 100% Open Source.
Stars: ✭ 3,457 (+729.02%)
Mutual labels:  bot, chat
Slack Meme
A Meme Bot for Slack.
Stars: ✭ 322 (-22.78%)
Mutual labels:  bot, slack
Dialogflow Web V2
Dialogflow Web Integration. Rich Components, Actions on Google and more
Stars: ✭ 307 (-26.38%)
Mutual labels:  bot, chat
Intelligo
πŸ€– Chatbot Framework for Node.js.
Stars: ✭ 347 (-16.79%)
Mutual labels:  bot, slack
Serverless Slack App
A Serverless.js Slack App Boilerplate with OAuth and Bot actions
Stars: ✭ 217 (-47.96%)
Mutual labels:  bot, slack
Sactive Bot
😈 An extensible chat bot framework. sactive-bot is an evolution of the open source hubot project. - https://www.shipengqi.top/sactive-bot .
Stars: ✭ 212 (-49.16%)
Mutual labels:  bot, slack
Rasatalk
A chatbot framework for Rasa NLU
Stars: ✭ 225 (-46.04%)
Mutual labels:  bot, chatbot-framework
Rasa core
Rasa Core is now part of the Rasa repo: An open source machine learning framework to automate text-and voice-based conversations
Stars: ✭ 2,302 (+452.04%)
Mutual labels:  bot, chatbot-framework
Cordova Plugin Native Keyboard
🎹 Add a Slack / WhatsApp - style chat keyboard to your Cordova app!
Stars: ✭ 271 (-35.01%)
Mutual labels:  chat, slack
Pokemongo Bot
The Pokemon Go Bot, baking with community.
Stars: ✭ 3,730 (+794.48%)
Mutual labels:  bot, slack
Go Sarah
Simple yet customizable bot framework written in Go.
Stars: ✭ 188 (-54.92%)
Mutual labels:  bot, slack
Hubot Slack
Slack Developer Kit for Hubot
Stars: ✭ 2,260 (+441.97%)
Mutual labels:  bot, slack

Joe Bot πŸ€–

A general-purpose bot library inspired by Hubot but written in Go.


Joe is a library used to write chat bots in the Go programming language. It is very much inspired by the awesome Hubot framework developed by the folks at Github and brings its power to people who want to implement chat bots using Go.

Getting Started

Joe is a software library that is packaged as Go module. You can get it via:

go get github.com/go-joe/joe

Example usage

You can find all code examples, more explanation and complete recipes at https://joe-bot.net

Each bot consists of a chat Adapter (e.g. to integrate with Slack), a Memory implementation to remember key-value data (e.g. using Redis) and a Brain which routes new messages or custom events (e.g. receiving an HTTP call) to the corresponding registered handler functions.

By default joe.New(…) uses the CLI adapter which makes the bot read messages from stdin and respond on stdout. Additionally the bot will store key value data in-memory which means it will forget anything you told it when it is restarted. This default setup is useful for local development without any dependencies but you will quickly want to add other Modules to extend the bots capabilities.

The following example connects the Bot with a Slack workspace and stores key-value data in Redis. To allow the message handlers to access the memory we define them as functions on a custom ExampleBottype which embeds the joe.Bot.

package main

import (
	"fmt"

	"github.com/go-joe/joe"
	"github.com/go-joe/redis-memory"
	"github.com/go-joe/slack-adapter/v2"
)

type ExampleBot struct {
	*joe.Bot
}

func main() {
	b := &ExampleBot{
		Bot: joe.New("example",
			redis.Memory("localhost:6379"),
			slack.Adapter("xoxb-1452345…"),
		),
	}

	b.Respond("remember (.+) is (.+)", b.Remember)
	b.Respond("what is (.+)", b.WhatIs)

	err := b.Run()
	if err != nil {
		b.Logger.Fatal(err.Error())
	}
}

func (b *ExampleBot) Remember(msg joe.Message) error {
	key, value := msg.Matches[0], msg.Matches[1]
	msg.Respond("OK, I'll remember %s is %s", key, value)
	return b.Store.Set(key, value)
}

func (b *ExampleBot) WhatIs(msg joe.Message) error {
	key := msg.Matches[0]
	var value string
	ok, err := b.Store.Get(key, &value)
	if err != nil {
		return fmt.Errorf("failed to retrieve key %q from brain: %w", key, err)
	}

	if ok {
		msg.Respond("%s is %s", key, value)
	} else {
		msg.Respond("I do not remember %q", key)
	}

	return nil
}

Available modules

Joe ships with no third-party modules such as Redis integration to avoid pulling in more dependencies than you actually require. There are however already some modules that you can use directly to extend the functionality of your bot without writing too much code yourself.

If you have written a module and want to share it, please add it to this list and open a pull request.

Chat Adapters

Memory Modules

Other Modules

Built With

  • zap - Blazing fast, structured, leveled logging in Go
  • multierr - Package multierr allows combining one or more errors together
  • testify - A simple unit test library

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and on the process for submitting pull requests to this repository.

Versioning

THIS SOFTWARE IS STILL IN ALPHA AND THERE ARE NO GUARANTEES REGARDING API STABILITY YET.

All significant (e.g. breaking) changes are documented in the CHANGELOG.md.

After the v1.0 release we plan to use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Friedrich Große - Initial work - fgrosse

See also the list of contributors who participated in this project.

License

This project is licensed under the BSD-3-Clause License - see the LICENSE file for details.

Acknowledgments

  • Hubot and its great community for the inspiration
  • embedmd for a cool tool to embed source code in markdown files
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].