Skip to content

Instantly share code, notes, and snippets.

@penguin2716
Created May 7, 2014 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penguin2716/bd0d701c81a114739bde to your computer and use it in GitHub Desktop.
Save penguin2716/bd0d701c81a114739bde to your computer and use it in GitHub Desktop.
全部のアカウントでふぁぼるmikutterプラグイン(mikutter>=3.0.0)
# -*- coding: utf-8 -*-
Plugin.create :fav_all_accounts do
proc = Plugin.filtering(:command, Hash.new).first[:account_forward][:exec]
command(:fav_all_accounts,
name: '全部のアカウントでふぁぼる',
condition: lambda{ |opt| true },
visible: true,
role: :timeline) do |opt|
Service.instances.size.times do
opt.messages.select(&:favoritable?).reject{ |m| m.favorited_by_me? Service.primary }.each(&:favorite)
proc.call(nil)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment