Skip to content

Instantly share code, notes, and snippets.

@shibafu528
Created March 24, 2016 13:12
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 shibafu528/84163269570ba96d4107 to your computer and use it in GitHub Desktop.
Save shibafu528/84163269570ba96d4107 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
Plugin.create(:mikutter_request_retweet) do
command(
:mikutter_request_retweet,
name: 'リツイート許可要求',
condition: -> _ { true },
visible: true,
role: :timeline
) do |opt|
msg = <<EOS
@#{opt.messages[0].user.idname}
お世話になっております、
#{Service.primary.idname}です。
先ほどのツイートを拝見いたしました。
お手数をお掛けし大変恐縮ではございますが、
RTの可否を御回答頂きますようお願い申し上げます。
以上、よろしくお願いします。
EOS
Service.primary.post(:message => msg, :replyto => opt.messages[0])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment