Skip to content

Instantly share code, notes, and snippets.

@shibafu528

shibafu528/extract_manko.rb Secret

Created May 1, 2021
Embed
What would you like to do?
これ使ったらバグってて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