Created
July 13, 2019 08:54
-
-
Save Akkiesoft/985c983a6546233335a4ba73a58aeb1b to your computer and use it in GitHub Desktop.
This file contains 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 -*- | |
Plugin.create(:mikutter_kumabokujo) do | |
command( | |
:mikutter_kumabokujo, | |
name: 'のぼりべつクマ牧場', | |
condition: lambda{ |opt| true }, | |
visible: true, | |
role: :timeline | |
) do |opt| | |
opt.messages.each do |message| | |
Plugin.call(:kumabokujo, message, message.user.idname) | |
end | |
end | |
on_kumabokujo do | message, to_name | | |
greets = ["の!ぼ!り!べ!つ!","と言えば!?", "く!ま!ぼ!く!じょう!", "\クマボクジョ!!/", | |
"ユカイな仲間が〜?!", "たのしい仲間が〜!?", "Yeah!", "みんな待ってるぜぇ〜!", "ここは登別", "クマ牧場!!"] | |
n_msg = "" | |
msg = "@"+to_name + " " | |
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