Created
December 25, 2012 03:05
-
-
Save toshia/4371487 to your computer and use it in GitHub Desktop.
ごぼう♡
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 :gobou do | |
GOBOU_SIGN = "♡" | |
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| | |
GOBOU_QUANTITY.times do |c| | |
message.post message: "@#{message.user[:idname]} ごぼう#{GOBOU_SIGN * (c+1)}" end end end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment