Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

simple redis slack bot

License

NotificationsYou must be signed in to change notification settings

orcaman/redibot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redibot is a redis bot for Slack I hacked on the other day. Hopefully we could turn this into something useful.

Alt text

Features:

  • Pub-sub support: the neat thing about this is that you can basically start sending notifications into Slack from any of your servers via redis publishing. Subscribe to any channel from Slack and publish from any backend that has access to publish on redis.
  • Collabarative: bring redis into the conversation! you can fetch, set, etc. from redis and discuss with your team mates.
  • redis-cli in your Slack. No need to leave Slack in order to run redis commands.

usage

In order to useredibot, you need to run theredibot server and setup a new bot on your slack account. SeeAdding a new bot to your slack below. Once installed, use theredis commands syntax same as you would useredis-cli. A few examples:

Connect to a redis server instance:

@redibot connect my.redis.host.com:6379 MY REDIS PASSWORD

Set a value on redis:

orcaman [12:19 PM]  @redibot INCR counterredibotBOT [12:19 PM]  1

![Alt text](/img/Screen Shot 2016-10-06 at 21.10.04.png?raw=true "redibot")

You can also publish and subscribe! the neat thing about this is that you can basically start sending notifications from all your servers via redis publishing, without having to create a designated webhook on Slack.

@redibot subscribe my_channel@redibot publish my_channel hello there!---- output on slack -----my_channel: message: hello there!

![Alt text](/img/Screen Shot 2016-10-06 at 21.15.16.png?raw=true "redibot")

Adding a new bot to your slack

  1. Browser over here:https://my.slack.com/services/new/bot
  2. Create "redibot" username (or any other name that suites you)
  3. Grab tha auth token - you need this to run the server

Running the server

It's easiest to run the server using docker:

docker run -e "redibot_token=YOUR SLACK BOT TOKEN" orcaman/redibot

Otherwise you can build and run the binary (see development).

development

CD to the redibot directory, get the deps and go build:

go get github.com/garyburd/redigo/redisgo get github.com/gorilla/websocketgo build

To update the docker container after a new build:

docker build -t orcaman/redibot.

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp