Skip to content

Instantly share code, notes, and snippets.

@shibafu528
Created May 1, 2021 06:30
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 shibafu528/2610e59e8221c3d5aa1afac51fb4cf1d to your computer and use it in GitHub Desktop.
Save shibafu528/2610e59e8221c3d5aa1afac51fb4cf1d to your computer and use it in GitHub Desktop.
これ使ったらバグっててbotが無限にまんこ連呼して連合に大迷惑かけた
# -*- coding: utf-8 -*-
Plugin.create(:extract_manko) do
subscribe(:extract_receive_message, :"mastodon-shibafu528@ertona.net-home").each do |message|
if message.description =~ /(manko|まんこ|マンコ)/
world, = Plugin.filtering(:world_current, nil)
compose(world, message, body: "@#{message.user.idname} お :manko: ぉ^〜 #bot", visibility: :unlisted).next do |msg|
notice "Reply success: #{msg}"
end.trap do |err|
error "Reply failed: #{err}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment