Skip to content

Instantly share code, notes, and snippets.

@tobynet
Forked from firstspring1845/miku_beam.rb
Last active August 29, 2015 14:00
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 tobynet/8d1db6d3c7cff3cc21c9 to your computer and use it in GitHub Desktop.
Save tobynet/8d1db6d3c7cff3cc21c9 to your computer and use it in GitHub Desktop.
Mikutter プラグインのみくビームを汎用的にして、earthquake.gem pluginに移植
# -*- coding: utf-8 -*-
#
# Miku beam plugin for earthquake.gem
#
# Usage:
# :mikubeam
# update 'みくビーム!みくみくみくみくwwwwwwww'
#
# :javabeam ねこ
# update 'ねこビーム!ねこねこねこねこwwwwwwww'
#
# :javabeam とですきんぐ
# update 'とですきんぐビーム!とですとですとですとですwwwwwwww'
#
# # For replying
# :javabeam $aq じゃば
# reply '@plus7 じゃばビーム!じゃばじゃばじゃばじゃばwwwwwwww'
#
Earthquake.init do
command %r|^:mikubeam\s*(\d+)*\s*(.*)$|, :as => :mikubeam do |m|
cmd = m[1] ? ":reply #{m[1]}" : ":update"
content = if m[2] && !m[2].empty?
m[2]
else
'みく'
end
input("#{cmd} #{content}ビーム!#{content[0...3] * 4}wwwwwwww")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment