Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@sushi514 のツイートがしょっぱかったら即座にふぁぼるmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :auto_favorite_sushi514_shio do
@target_username = "sushi514"
@regexp = /しお|塩|sh?io|salt/
on_appear do |messages|
messages.each do |m|
next unless m.user.to_s == @target_username
m.favorite if @regexp.match m.to_s
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment