Top Banner
Osoji to-ban bot 2016/08/04(Thu) meguro.es #5 @treby006
36

Osoji to-ban bot

Apr 16, 2017

Download

Technology

treby
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Osoji to-ban bot

Osoji to-ban bot2016/08/04(Thu) meguro.es #5

@treby006

Page 2: Osoji to-ban bot

treby.info(){

name: ‘treby / Hiroaki Ninomiya’,

description: ‘freelance (Ruby(Shinjuku.rb), PHP, Vue.js)’,

portfolio: ‘http://treby.info/’,

twitter: ‘@treby006’,

facebook: ‘Hiroaki.Ninomiya’

}

Page 3: Osoji to-ban bot

[PR] LINE Blog

http://lineblog.me/treby/

Freelance diary, almost poems :)

Page 4: Osoji to-ban bot

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.

Page 5: Osoji to-ban bot

Moto-neta

http://qiita.com/treby/items/3e6cb3f4ac835dcc6017

Page 6: Osoji to-ban bot

Are you ready?

Page 7: Osoji to-ban bot

Go!!!

Page 8: Osoji to-ban bot

BackgroundI worked at a small team placed in a room (SOHO)

Page 9: Osoji to-ban bot

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…

Page 10: Osoji to-ban bot

Background

Page 11: Osoji to-ban bot

Problem

You know, most of people were very busy.

So, the duty were often forgot.

Our office became dirty, day by day. x(

Page 12: Osoji to-ban bot

Solution

Page 13: Osoji to-ban bot

Using Hubot

Page 14: Osoji to-ban bot

Osoji to-ban bot

To solve this problem, I made an bot named “cleanbear".

Management who should clean the office.

Page 15: Osoji to-ban bot

Function

Worked on Slack. Powered by Heroku.

Add or Remove slack account.

Notice and change the duty regularly.

Page 16: Osoji to-ban bot

Structure

common functions

redis

cron jobcommand interface

Page 17: Osoji to-ban bot

Implementation - commonFunctions to manage the duty.

getSweepers

getCurrentSweeper

getNextSweeper

rotateSweeper

https://gist.github.com/treby/f4dfa50e39c3725b6f13

Page 18: Osoji to-ban bot

Implementation - cron

Execution regularly

Every Monday noon.

Every Wednesday

Every Friday (Change duty)

https://gist.github.com/treby/826f09c054a71fa94bd1

Page 19: Osoji to-ban bot

Implementation - command

Commands for ChatOps

indexSweepers

createSweeper

destroySweeper

clearSweeper

https://gist.github.com/treby/b4daceacd6a385d2395c

Page 20: Osoji to-ban bot

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>

Page 21: Osoji to-ban bot

FeedbackPros

No longer annoying the management of the clean duty! yay!

Cons

Ignoring bot’s mention…

I believe the problem was totally solved. yes.

Page 22: Osoji to-ban bot

One more thing…

Page 23: Osoji to-ban bot

bot’s advantage - Interaction

The bot’s main factor is interaction.

Virtual communication

SABISHIKUNAI

Page 24: Osoji to-ban bot

By the way, I love imas.

Page 25: Osoji to-ban bot

bot x imas

Page 26: Osoji to-ban bot

ORE-TOKU

Page 27: Osoji to-ban bot
Page 28: Osoji to-ban bot

Twitter x Hubot

Page 29: Osoji to-ban bot
Page 30: Osoji to-ban bot
Page 31: Osoji to-ban bot

bot can make communications!

Page 32: Osoji to-ban bot

First, chatops should be helpful.

Page 33: Osoji to-ban bot

But, mainly chat bot should be your friend.

Page 34: Osoji to-ban bot

……I think :)

Page 35: Osoji to-ban bot

Have a good bot’s life!

Page 36: Osoji to-ban bot

Happy Hacking!!