osoji to-ban bot
TRANSCRIPT
treby.info(){
name: ‘treby / Hiroaki Ninomiya’,
description: ‘freelance (Ruby(Shinjuku.rb), PHP, Vue.js)’,
portfolio: ‘http://treby.info/’,
twitter: ‘@treby006’,
facebook: ‘Hiroaki.Ninomiya’
}
AgendaI like making bots, so I’m familiar with Hubot.
Hubot was made by GitHub. And written in CoffeeScript.
I made an bot for the business purpose.
Introduce background, solution, implementation, feedbacks.
Moto-neta
http://qiita.com/treby/items/3e6cb3f4ac835dcc6017
Background
There were no clean staffs, so we should clean our office ourselves.
We created weekly duty for clean.
To manage the duty, we used hand-mades plate…
Problem
You know, most of people were very busy.
So, the duty were often forgot.
Our office became dirty, day by day. x(
Osoji to-ban bot
To solve this problem, I made an bot named “cleanbear".
Management who should clean the office.
Function
Worked on Slack. Powered by Heroku.
Add or Remove slack account.
Notice and change the duty regularly.
Implementation - commonFunctions to manage the duty.
getSweepers
getCurrentSweeper
getNextSweeper
rotateSweeper
https://gist.github.com/treby/f4dfa50e39c3725b6f13
Implementation - cron
Execution regularly
Every Monday noon.
Every Wednesday
Every Friday (Change duty)
https://gist.github.com/treby/826f09c054a71fa94bd1
Implementation - command
Commands for ChatOps
indexSweepers
createSweeper
destroySweeper
clearSweeper
https://gist.github.com/treby/b4daceacd6a385d2395c
Implementation - commandCommands
hubot sweepers list
hubot sweepers add <slack name>
hubot sweepers remove <slack name>
hubot sweepers current
hubot sweepers rotate
hubot sweepers set <slack name>
FeedbackPros
No longer annoying the management of the clean duty! yay!
Cons
Ignoring bot’s mention…
I believe the problem was totally solved. yes.
bot’s advantage - Interaction
The bot’s main factor is interaction.
Virtual communication
SABISHIKUNAI