Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Last active September 19, 2021 13:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Akkiesoft/2a85ed8fd371dc099050823216ca4895 to your computer and use it in GitHub Desktop.
Save Akkiesoft/2a85ed8fd371dc099050823216ca4895 to your computer and use it in GitHub Desktop.
カーーン!!!
# -*- coding: utf-8 -*-
Plugin.create(:mikutter_hokkaido_no_ie) do
command(
:mikutter_hokkaido_no_ie,
name: '木の城たいせつ',
condition: lambda{ |opt| true },
visible: true,
role: :timeline
) do |opt|
opt.messages.each do |message|
Plugin.call(:hokkaido_no_ie, message)
end
end
on_hokkaido_no_ie do | message |
greets = ["\カーン!!/", "北海道の家〜〜!","(女声)木の城!", "(男声)木の城!", "木の城!!", "木の城たいせつ〜!"]
n_msg = ""
msg = "@"+ message.user.idname + " "
while true do
n_msg = greets.sample
break if msg.split(//).size + n_msg.split(//).size >= 140
msg += n_msg
end
world, = Plugin.filtering(:world_current, nil)
compose(world, message, body: msg)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment