Last active
August 29, 2015 14:05
-
-
Save shibafu528/18db3d1f1c1b7ebfcd6d to your computer and use it in GitHub Desktop.
recotw.tk に黒歴史を投げつけよう
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'net/http' | |
Plugin.create(:mikutter_recotw) do | |
command(:post_recotw, | |
name: 'recotwに登録', | |
condition: Plugin::Command::CanReplyAll, | |
visible: true, | |
icon: nil, | |
role: :timeline) do |opt| | |
opt.messages.each do |message| | |
next if message[:system] | |
http = Net::HTTP.new('api.recotw.black') | |
p http.post("/1/tweet/record_tweet", "id=#{message[:id]}") | |
end | |
activity :system, "黒歴史を送信しちゃったよ♪" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment