All Projects → sbstjn → Hanu

sbstjn / Hanu

Licence: mit
Golang Framework for writing Slack bots

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Hanu

Slacker
Slack Bot Framework
Stars: ✭ 495 (+286.72%)
Mutual labels:  slackbot, chat, slack, chatops
Quickblox Javascript Sdk
JavaScript SDK of QuickBlox cloud backend platform
Stars: ✭ 98 (-23.44%)
Mutual labels:  framework, chat, communication
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 (+65.63%)
Mutual labels:  slackbot, slack, chatops
Botonomous
A PHP Framework For Creating Autonomous Slack Bots
Stars: ✭ 109 (-14.84%)
Mutual labels:  slackbot, framework, slack
Rocket.chat.electron
Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat
Stars: ✭ 1,108 (+765.63%)
Mutual labels:  chat, slack
Broid Kit
Bot framework powered by Broid
Stars: ✭ 58 (-54.69%)
Mutual labels:  framework, slack
Jbot
Make Slack and Facebook Bots in Java.
Stars: ✭ 1,148 (+796.88%)
Mutual labels:  slackbot, slack
Rocket.chat.ansible
Deploy Rocket.Chat with Ansible!
Stars: ✭ 80 (-37.5%)
Mutual labels:  chat, slack
Slack Ruby Client
A Ruby and command-line client for the Slack Web, Real Time Messaging and Event APIs.
Stars: ✭ 957 (+647.66%)
Mutual labels:  slackbot, slack
Showcase Ansible Chatops
Vagrant Demo showing ChatOps with Ansible
Stars: ✭ 71 (-44.53%)
Mutual labels:  slack, chatops
Code Pipeline Slack
Slack bot for code pipeline deployments
Stars: ✭ 88 (-31.25%)
Mutual labels:  slackbot, slack
Slack Poster
Simple gem to post messages on Slack using web hooks.
Stars: ✭ 49 (-61.72%)
Mutual labels:  slackbot, slack
Vuejs Slack Clone Realtime
Slack clone using VueJS and firebase
Stars: ✭ 33 (-74.22%)
Mutual labels:  chat, slack
Hubcommander
A Slack bot for GitHub organization management -- and other things too
Stars: ✭ 1,149 (+797.66%)
Mutual labels:  slack, chatops
Obed Bot
🍴 Obed Slack Bot, na požiadanie kontroluje aktuálnu ponuku denného menu reštaurácii. [only for slovak|czech users]
Stars: ✭ 32 (-75%)
Mutual labels:  slackbot, slack
Talkyard
A community discussion platform: Brings together the main features from StackOverflow, Slack, Discourse, Reddit, and Disqus blog comments.
Stars: ✭ 1,219 (+852.34%)
Mutual labels:  chat, slack
Facebot
Slackbot for facebook messaging integration in slack
Stars: ✭ 91 (-28.91%)
Mutual labels:  slackbot, slack
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (-18.75%)
Mutual labels:  chat, communication
Cog
Bringing the power of the command line to chat
Stars: ✭ 910 (+610.94%)
Mutual labels:  slack, chatops
Rocket.chat
The communications platform that puts data protection first.
Stars: ✭ 31,251 (+24314.84%)
Mutual labels:  chat, slack

hanu - Go for Slack Bots!

Current Release MIT License Read Tutorial Code Example

The Go framework hanu is your best friend to create Slack bots! hanu uses allot for easy command and request parsing (e.g. whisper <word>) and runs fine as a Heroku worker. All you need is a Slack API token and you can create your first bot within seconds! Just have a look at the hanu-example bot or read my tutorial

Features

  • Respond to mentions
  • Respond to direct messages
  • Auto-Generated command list for help
  • Works fine as a worker on Heroku

Usage

Use the following example code or the hanu-example bot to get started.

package main

import (
	"log"
	"strings"

	"github.com/sbstjn/hanu"
)

func main() {
	slack, err := hanu.New("SLACK_BOT_API_TOKEN")

	if err != nil {
		log.Fatal(err)
	}

	Version := "0.0.1"

	slack.Command("shout <word>", func(conv hanu.ConversationInterface) {
		str, _ := conv.String("word")
		conv.Reply(strings.ToUpper(str))
	})

	slack.Command("whisper <word>", func(conv hanu.ConversationInterface) {
		str, _ := conv.String("word")
		conv.Reply(strings.ToLower(str))
	})

	slack.Command("version", func(conv hanu.ConversationInterface) {
		conv.Reply("Thanks for asking! I'm running `%s`", Version)
	})

	slack.Listen()
}

The example code above connects to Slack using SLACK_BOT_API_TOKEN as the bot's token and can respond to direct messages and mentions for the commands shout <word> , whisper <word> and version.

You don't have to care about help requests, hanu has it built in and will respond with a list of all defined commands on direct messages like this:

/msg @hanu help

Of course this works fine with mentioning you bot's username as well:

@hanu help

Slack

Use direct messages for communication:

/msg @hanu version

Or use the bot in a public channel:

@hanu version

Dependencies

Credits

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].