Skip to content

Instantly share code, notes, and snippets.

@hizuru
Last active December 12, 2015 02:38
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 hizuru/4700697 to your computer and use it in GitHub Desktop.
Save hizuru/4700697 to your computer and use it in GitHub Desktop.
timeline上をegosearchしてDMでURLとscreennameを送るよ
# -*- coding: utf-8 -*-
Plugin.create :egosearch do
on_appear do |ms|
ms.each do |m|
if m.message.to_s !~ /@#{Service.primary.user}/ and m.user != Service.primary.user
if m.message.to_s =~ /ひづる/u
Service.primary.post(:message => "D #{Service.primary.user} http://twitter.com/#{m.message.user.idname}/status/#{m.message[:id]} @#{m.message.user.idname}")
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment