Last active
August 29, 2015 14:03
-
-
Save firstspring1845/d6d72735dc52adc908ea to your computer and use it in GitHub Desktop.
ブロックを使わないといけないツイッターつらい
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 -*- | |
Plugin.create :block do | |
command(:block, | |
name: 'ブロックする', | |
condition: Plugin::Command::CanReplyAll, | |
visible: true, | |
icon: nil, | |
role: :timeline) do |opt| | |
user = opt.messages.first.user | |
if ::Gtk::Dialog.confirm("@#{user[:idname]}をブロックしますよ、本当にいいんですか?") | |
if ::Gtk::Dialog.confirm("取り返しが付かないですがよろしいですね?") | |
(Service.primary.twitter/'blocks/create').json(:screen_name => user[:idname]) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment