Skip to content

Instantly share code, notes, and snippets.

@toshia
Created March 8, 2018 13:55
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 toshia/1227d8f468ace3444adc9574f57bfe1b to your computer and use it in GitHub Desktop.
Save toshia/1227d8f468ace3444adc9574f57bfe1b to your computer and use it in GitHub Desktop.
ウーンチ!ウーンチ!ウーンチ!ウーンチ!
Plugin.create(:poop_parrot) do
poop_text = [
'ウンチーーーー!!!',
'ヴーンチ💕ヴーンチ💕ヴーンチ💕ヴーンチ💕',
'ウンチ!?',
'カワイイノ💕'
]
command(:poop_parrot,
name: 'ウーンチ!',
condition: ->opt{
world, = Plugin.filtering(:world_current, nil)
compose?(world, to: opt.messages)
},
visible: true,
role: :timeline) do |opt|
world, = Plugin.filtering(:world_current, nil)
opt.messages.each do |m|
compose(world,
m,
body: "@#{m.user.idname} #{poop_text.sample}")
end
end
end
@toshia
Copy link
Author

toshia commented Mar 8, 2018

mikutter 3.6のSpell機能を利用して書いたクソプラグインのサンプルです。

Twitterはもちろん、WorldonプラグインPortalプラグインによって提供されるWorldで動作確認しています。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment