Created
December 9, 2011 05:36
-
-
Save katsyoshi/1450337 to your computer and use it in GitHub Desktop.
ラピュタ向けのmikutter Pluginだよ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plugin.create(:laputa) do | |
filter_command{|menu| | |
menu[:bars] = { | |
:slug => :bars, | |
:name => 'バルス', | |
:condition => lambda{|m| m.message.repliable?}, | |
:exec => lambda{|m| bars}, | |
:visible => true, | |
:role => :message | |
} | |
[menu] | |
} | |
filter_command{|menu| | |
menu[:dora] = { | |
:slug => :dora, | |
:name => '40秒で仕度しな!', | |
:condition => lambda{|m| m.message.repliable?}, | |
:exec => lambda{|m| Post.primary_service.update(:message => '40秒で仕度しな!')}, | |
:visible => true, | |
:role => :message | |
} | |
[menu] | |
} | |
def bars | |
Post.primary_service.update(:message => "バルス!!") | |
Post.primary_service.update(:message => "@toshi_a バルス!!") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment