Created
December 25, 2012 03:09
-
-
Save toshia/4371496 to your computer and use it in GitHub Desktop.
ごぼう♡
This file contains hidden or 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 :gobou do | |
| UserConfig[:gobou_sign] ||= "♡" | |
| UserConfig[:gobou_quantity] ||= 1 | |
| command(:gobou, | |
| name: 'ごぼう', | |
| condition: lambda{ |opt| !opt.messages.empty? and opt.messages.all? &:repliable? }, | |
| visible: true, | |
| role: :timeline) do |opt| | |
| opt.messages.each do |message| | |
| UserConfig[:gobou_quantity].times do |c| | |
| message.post message: "@#{message.user[:idname]} ごぼう#{UserConfig[:gobou_sign] * (c+1)}" end end end | |
| settings "ごぼう" do | |
| input "ごぼうの後の記号", :gobou_sign | |
| adjustment "ごぼうの量", :gobou_quantity, 1, 3 | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment