Skip to content

Instantly share code, notes, and snippets.

@fimbul fimbul/teostar.rb
Last active Dec 14, 2015

Embed
What would you like to do?
50ふぁぼられ、100ふぁぼられ、250ふぁぼられでTeoStar風にミクさんから祝福されます。FavStarにBANされた人でも祝福してくれます。
#-*- coding: utf-8 -*-
Plugin.create :teostar do
on_favorite do |service, user_obj, message|
fav_count = message.favorited_by.size
case fav_count
when 50, 100, 250
link = "http://twitter.com/#{service.user_obj}/status/#{message.id}"
tweet = "Congrats on your #{fav_count}〄 tweet! #{link}"
Plugin.call(:update, nil, [Message.new(:message => tweet, :system => true)])
end
end
end
@taiki45

This comment has been minimized.

Copy link

taiki45 commented Mar 8, 2013

他に選択肢があるとしたら

if [50, 100, 250].include? fav_count
  'codes'
end

かなぁ…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.