Last active
September 19, 2021 13:49
-
-
Save Akkiesoft/2a26221729e224ced44f348a1b3d9138 to your computer and use it in GitHub Desktop.
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 -*- | |
Plugin.create(:mikutter_kyuuyo_koujo) do | |
command( | |
:mikutter_kyuuyo_koujo, | |
name: '給与所得者の基礎控除申告書兼給与所得者の配偶者控除等申告書兼所得金額調整控除申告書', | |
condition: lambda{ |opt| true }, | |
visible: true, | |
role: :timeline | |
) do |opt| | |
opt.messages.each do |message| | |
Plugin.call(:kyuuyo_koujo, message) | |
end | |
end | |
on_kyuuyo_koujo 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