Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
全部のアカウントでふぁぼる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