Skip to content

Instantly share code, notes, and snippets.

@siyo siyo/miil_taisaku.rb
Last active Dec 19, 2015

Embed
What would you like to do?
# -*- coding: utf-8 -*-
Earthquake.init do
output_filter do |item|
next unless item["user"] && item["text"]
account = item["user"]["screen_name"]
id = item["id"]
txt = item["text"]
res = %w|おいしそう うまそう わたしも食べたい〜 美味しそう|
if /http:\/\/miil\.me\/p\/[\w]+/ =~ txt
twitter.update( "@#{account} #{res.sample} #{'!' * rand(20)} #miil_taisaku", :in_reply_to_status_id =>id )
end
true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.