Created
June 23, 2013 06:28
-
-
Save tsux89/5844029 to your computer and use it in GitHub Desktop.
TLの言葉に反応させます。
自分が実際に実装しているものをそのまま載せるので、使いたい場合は自分なりに改変してみてください。
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 'twitter' | |
require 'tweetstream' | |
require 'date' | |
ck = 'IQKbtAYlXLripLGPWd0HUA' | |
cs = 'GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU' | |
at = '' | |
ats = '' | |
rep_at = '' | |
rep_ats = '' | |
# -------------AUTH TWITTER------------- # | |
$host = Twitter::Client.new( | |
:consumer_key => ck, | |
:consumer_secret => cs, | |
:oauth_token => at, | |
:oauth_token_secret => ats | |
) | |
$reply = Twitter::Client.new( | |
:consumer_key => ck, | |
:consumer_secret => cs, | |
:oauth_token => rep_at, | |
:oauth_token_secret => rep_ats | |
) | |
# -------------------- REPLY DEFINITION -------------------- # | |
$tweet = ["大吉", | |
"中吉", | |
"小吉", | |
"凶", | |
"中凶", | |
"大凶"] | |
$meshi = ["はメシをよそえませんでした", | |
"はメシをよそえました!おめでとう!よっそいよっそい!よっそいよっそい!!", | |
"はメシをこぼしました", | |
"はそもそもメシぎらいでした", | |
"はメシよりもパン派でした", | |
"はメシをよそえませんでした", | |
"はメシをこぼしました", | |
"はメシをこぼしました", | |
"はメシをよそえませんでした", | |
"はメシをよそえませんでした", | |
"はパンを食べました"] | |
$kin = ["◎", "○", "△", "✕"] | |
$ren = ["◎", "○", "△", "✕"] | |
$shi = ["◎", "○", "△", "✕"] | |
$sou = ["◎", "○", "△", "✕"] | |
$atama = ["は頭大丈夫です", | |
"は頭大丈夫じゃないです"] | |
$okazu = ["http://goo.gl/NB2O", | |
"http://goo.gl/0Rvj", | |
"http://goo.gl/mjXL", | |
"http://goo.gl/yuEJ", | |
"http://goo.gl/1ig7Z", | |
"http://goo.gl/aVEe4", | |
"http://goo.gl/qyLi", | |
"http://goo.gl/Vfcj", | |
"http://goo.gl/7IO0"] | |
# -------------------- STREAMING -------------------- # | |
TweetStream.configure do |config| | |
config.consumer_key = ck | |
config.consumer_secret = cs | |
config.oauth_token = at | |
config.oauth_token_secret = ats | |
config.auth_method = :oauth | |
end | |
client = TweetStream::Client.new | |
client.userstream do |status| | |
puts "#{status.user.screen_name}: #{status.text}" | |
str = status.text | |
$kichi = ["@#{status.user.screen_name} あなたは今日も私たちのTLを荒らしているようですね。今まで再三警告をしたにもかかわらずの結果です。\n今後も改善されることは無いと判断し、本日中にアカウントを削除しないのであれば私達フォロワー一同は被害者の会を設立し法的措置を取らせて頂きます。では。", | |
"@#{status.user.screen_name} 今のツイートは、脅迫に当たるのではないのでしょうか?この案件に対しては、弁護士に依頼して法的手続きを取らさせていただきますので、覚悟しておいて下さい。\n今更謝っても遅いですよ。あなたは法を犯しました。監獄の中でゆっくりと反省してください。", | |
"@#{status.user.screen_name}そのツイートは私への脅迫と受け取って良いですね。その場合、刑法第222条により犯罪です。今から私は貴方を裁判所に訴えます。もちろん貴方の更生を願ってです。\n貴方が牢獄で反省し、再び健全な状態で私の目の前に現れることを期待しています。", | |
"┗(^o^)┛イタ電するぞぉぉぉww( ^o^)☎┐もしもしwwwwww@#{status.user.screen_name}ですかwwwwwとりあえず垢消せwwwww( ^o^)Г☎チンッ", | |
"垢消せ体操いくよー!☜(´☢`)☞テュンwwwテュンテュンwwwwwwwwwwL(´☋`)┘ズモーズモー└(´☋`)」((☛(◜◔。◔◝)☚))ココココココココwwwwwwwwwwww┏( ◜◡~)┛イヤァァァアアアアアア垢消せ(☝ ◠‿◠ )☞@#{status.user.screen_name}", | |
"今日も元気に垢消しルーレット☆☜(^o^三 ^o^)三 ☞☆(^o^ 三^o^)☞☆(^o^) 次垢を消すのは・・・wwwwww ☆☜(^o^三 ^o^)三 ☞☆(^o^ 三^o^)☞☆(^o^)☞@#{status.user.screen_name}☜こいつだぁぁ!", | |
"( ◠‿◠ )つ(@#{status.user.screen_name})フォローしてみろ\n(◞‸◟)いやだよ\n( ◠‿◠ )いいからしてみろ\n(◞‸◟)分かったよ…\n( ◠‿◠ )どうだ?\nL('ω')┘三└('ω')」ヤバwwwクソつまらんwwwwwwwwwwww┗┐✌(◔ڼ◔)✌┌┛", | |
"誰だよここにゴミおいたのwwwwwwwwwwwww <(^o^)>┌┛',;';≡三 @#{status.user.screen_name}", | |
"I'll play soccerwwwwwwwwwwwwwwww <(^o^)>┌┛’,;’;≡三@#{status.user.screen_name}", | |
"あまりウチを怒らせない方がいいよ(笑)\nウチのバック(尻)には @#{status.user.screen_name} がついてるからwwwwwwwwwwwwwwwwwお前らなんかwwwwwwwICBMで木っ端微塵wwwwwwwwwwwwwwwwwwwwwwwwwww", | |
"精神科1名ゴアンナーイwwwwwwwwwwwwwヽ( ・∀・)ノ┌┛Σ======= @#{status.user.screen_name}", | |
"西野ヵナちゃんの新曲ぉたたぃてるコィッ!!→【@#{status.user.screen_name}】← !!まぢなんなの‼ ゥチゎゎかるょ。。せっなぃ乙女ゴコロ‼ ぃまだって、ケンゴとュゥジのぁぃだでゅれぅごくぅちのココロ。。", | |
"邪魔じゃ氏ね\n( ^o^)┌┛\n━━━━━┓ \\\n┓┓┓┓┓┃ [@#{status.user.screen_name}] \n┓┓┓┓┓┃ウワー\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n┓┓┓┓┓┃\n▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒", | |
"垢消しルーレット!☆☜(^o^三 ^o^)三 ☞☆(^o^ 三^o^)☞☆(^o^) 次垢を消すのは・・・☆☜(^o^三 ^o^)三 ☞☆(^o^ 三^o^)☞☆(^o^) ☞@#{status.user.screen_name} ☜こいつダアアアアアアアアアアwwwwwwwwwwwwww", | |
"育毛失敗ルーレット!☆☜(^o^三 ^o^)三 ☞☆(^o^ 三^o^)☞☆(^o^) 次に育毛に失敗するのは・・・☆☜(^o^三 ^o^)三 ☞☆(^o^ 三^o^)☞ @#{status.user.screen_name} ☜このハゲダアアアアアアアwwwwwwwwwwww", | |
"欝だ・・・・☝(◞‸◟)☝死のう・・・・・_| ̄| Σ・∴'、-=≡( ՞ਊ ՞)ウェーイwwwwwww @#{status.user.screen_name} にフォローされてたwwwwwwwwwww┗(^o^)┛復活wwwwwwwww✌✌✌✌(^o^≡^o^)✌✌✌✌wwwwwwwwwwww"] | |
num = "#{status.user.screen_name} #{Date.today}" | |
total = 0 | |
srand | |
if str =~ /(つるりん|x89|x89|はげ|ハゲ)/ && str =~ /(しね|死ね|氏ね|ざこ|zako|ザコ|雑魚|垢消せ)/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("#{$kichi.sample}", in_reply_to_status_id: status.id) | |
end | |
for i in num.bytes | |
print("0x", i.to_s(16), " ") | |
total += i | |
end | |
srand total | |
if str =~ /(お|オ|オ|o)(み|ミ|ミ|mi)(く|ク|ク|ku)(じ|ジ|ジ|ji|zi)/ && str =~ /x89/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("@#{status.user.screen_name} #{$tweet[rand($tweet.length)]}", in_reply_to_status_id: status.id) | |
end | |
if str =~ /(おっぱい|オッパイ|オッパイ|oppai)/ && str =~ /x89/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("@#{status.user.screen_name}\nチッチッチッチ おっぱい ぼいんぼい~ん\nチッチッチッチ おっぱい ぼいんぼい~ん\nもげもげもげ\nもげ もげもげ チチをもげ!\nもーげプリリン ポヨンもげー\nもーげポロロン プヨンもげー\nまんまるチッチッチ さんかくおぱーい\nロケットボイーン", in_reply_to_status_id: status.id) | |
end | |
if str =~ /(うらない|占い|ウラナイ|ウラナイ|uranai)/ && str =~ /x89/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("@#{status.user.screen_name}\n【今日の運勢】\n総合運:#{$sou[rand(4)]}\n金運:#{$kin[rand(4)]}\n恋愛運:#{$ren[rand(4)]}\n仕事運:#{$shi[rand(4)]}\n#{DateTime.now}", in_reply_to_status_id: status.id) | |
end | |
if str =~ /(め|メ|メ|me)(し|シ|シ|shi|si)(よ|ヨ|ヨ|yo)(そ|ソ|ソ|so)(い|イ|イ|i)/ && str =~ /x89/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("@#{status.user.screen_name} #{$meshi[rand(12)]}\n#{DateTime.now}", in_reply_to_status_id: status.id) | |
end | |
if str =~ /つるりんパイパンFUCK/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("@#{status.user.screen_name} 商品の案内を致します。\n中出しも潮吹きもクンニも丸見え! つるりんパイパンFUCK!! 4時間BEST\nhttp://www.dmm.co.jp/digital/videoa/-/detail/=/cid=mibd00654/", in_reply_to_status_id: status.id) | |
end | |
if str =~ /あたま/ && str =~ /x89/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("@#{status.user.screen_name} #{$atama[rand($atama.length)]}", in_reply_to_status_id: status.id) | |
end | |
if str =~ /ar working?/ && status.user.screen_name =~ /x89/ then | |
$reply.update("@#{status.user.screen_name} ar_x89 working! #{DateTime.now}", in_reply_to_status_id: status.id) | |
end | |
if str =~ /main working?/ && status.user.screen_name =~ /x89/ then | |
$host.update("main.rb working! #{DateTime.now}", in_reply_to_status_id: status.id) | |
end | |
if str =~ /(オカズ|おかず|okazu)/ && str =~ /x89/ then | |
$reply.follow("#{status.user.screen_name}") | |
$reply.update("@#{status.user.screen_name} #{$okazu.sample}", in_reply_to_status_id: status.id) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment