LoginSignup
2
1

More than 5 years have passed since last update.

rubotyのbotをSlackでkick => inviteする ruboty-reinvite を作成しました #ruboty

Posted at

概要

rubotyのbotをSlackでkick => inviteする ruboty-reinvite を作成しました

用途

局所的に必要な機能なのですが某所のrubotyが急にListenしなくなる、
という現象がありまして、それを解決するには kick - invite をし直す必要があります。
しかも、一般ユーザーは権限によって kick ができないため都度管理者に依頼する必要があります。
そこで再inviteを行う ruboty plugin を作ることにしました。

Installation

Add this line to your application's Gemfile:

gem 'ruboty-reinvite'

And then execute:

$ bundle

Commands

Command Pattern Description
reinvite reinvite #<?channel>(.+) kick and invite bot

Usage

reinvite

  • kick and invite bot
reinvite #times_tb

ENV

Slack の Token は https://api.slack.com/web で作成・確認します

Name Description
SLACK_API_TOKEN SlackAPI Token

Dependency

Name Description
Slack API https://api.slack.com/
Slack API Ruby Client https://github.com/aki017/slack-ruby-gem

メモ

ちなみにこの gem の作成・この記事の作成・GitHubのREADMEの作成には

  • ruboty-gen
  • ruboty-megen
  • ruboty-articlegen

を使いました。
詳しくは下記を参照。

Ruboty | 各種 Generator を利用して Ruboty のプロダクトコード・README・Qiita記事の作成コストを下げる

ちなみに、 ruboty-gen は保守が停止しているみたいなのですが今実行するとエラーがでます。
プルリクエストの内容を適用して1行コメントアウトすると動作するようになります。

ruboty-gen pull request #5

余力があるときに同等の機能をもつ generator を作るかも。

参照

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1