Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationEventAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.





node.js, redisが必要です。これらがインストールされてない場合は、まずインストールしてください。


brew install node redis


redis-server &


npm install -g hubot coffee-script


hubot --create myhubot



cd myhubot


Hubotへのコマンドの入力は、多くの場合、先頭に hubot と入力することで行います。hubot help<Enter>と入力してみましょう。

Hubot> hubot help
Hubot> Events:
debug - {user: <user object to send message to>}
Hubot <user> doesn't have <role> role - Removes a role from a user
Hubot <user> has <role> role - Assigns a role to a user
Hubot <user> is a badass guitarist - assign a role to a user
Hubot <user> is not a badass guitarist - remove a role from a user
Hubot animate me <query> - The same thing as `image me`, except adds a few parameters to try to return an animated GIF instead.
Hubot convert me <expression> to <units> - Convert expression to given units.
Hubot die - End Hubot process
Hubot echo <text> - Reply back with <text>
Hubot fake event <event> - Triggers the <event> event for debugging reasons
Hubot help - Displays all of the help commands that Hubot knows about.
Hubot help <query> - Displays all help commands that match <query>.
Hubot image me <query> - The Original. Queries Google Images for <query> and returns a random top result.
Hubot map me <query> - Returns a map view of the area returned by `query`.
Hubot math me <expression> - Calculate the given expression.
Hubot mustache me <query> - Searches Google Images for the specified query and mustaches it.
Hubot mustache me <url> - Adds a mustache to the specified URL.
Hubot ping - Reply with pong
Hubot pug bomb N - get N pugs
Hubot pug me - Receive a pug
Hubot show storage - Display the contents that are persisted in the brain
Hubot show users - Display all users that Hubot knows about
Hubot the rules - Make sure Hubot still knows the rules.
Hubot time - Reply with current time
Hubot translate me <phrase> - Searches for a translation for the <phrase> and then prints that bad boy out.
Hubot translate me from <source> into <target> <phrase> - Translates <phrase> from <source> into <target>. Both <source> and <target> are optional
Hubot what role does <user> have - Find out what roles are assigned to a specific user
Hubot who has admin role - Find out who's an admin and can assign roles
Hubot who is <user> - see what roles a user has
Hubot youtube me <query> - Searches YouTube for the query and returns the video embed link.
ship it - Display a motivation squirrel

コマンドリファレンスが表示されました。Hubotのコマンドの実体は、scripts ディレクトリにあるCoffeeScriptファイルです。scriptsディレクトリにファイルを追加することで、コマンドを追加することができます。以下では、今の時点で実行できるコマンドをいくつか実行してみます。

Hubot> hubot animate me partyhard
Hubot> http://images3.wikia.nocookie.net/__cb20070824174846/uncyclopedia/images/5/58/PARTYHARD4.gif#.png


Hubot> hubot mustach me obama
Hubot> http://mustachify.me/2?src=http://www.tothetick.com/wp-content/uploads/2013/08/Obama4.jpg#.png


Hubot> hubot ping
Hubot> PONG


Hubot> hubot pug bomb
Hubot> http://24.media.tumblr.com/tumblr_maxm4ecVNq1qjmqavo1_500.jpg
Hubot> http://29.media.tumblr.com/tumblr_lsvczkC8e01qzgqodo1_500.jpg
Hubot> http://24.media.tumblr.com/tumblr_lhowz2fAnC1qaa50yo1_500.jpg
Hubot> http://28.media.tumblr.com/tumblr_ltyzizUm3t1qb08qmo1_500.png
Hubot> http://29.media.tumblr.com/tumblr_lsu0igEEtP1qiys5ao1_500.png


Hubot> hubot the rules
Hubot> 1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2. A robot must obey any orders given to it by human beings, except where such orders would conflict with the First Law.
3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.


Hubot> hubot time
Hubot> Server time is: Tue Dec 03 2013 02:50:16 GMT+0900 (JST)


Hubot> ship it
Hubot> http://d2f8dzk2mhcqts.cloudfront.net/0772_PEW_Roundup/09_Squirrel.jpg


Hubot> hubot die
Hubot> Goodbye, cruel world.



Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Help us understand the problem. What are the problem?