1
0
Fork
You've already forked yaoibot
0
A bot that posts random Yaoi to the fediverse upon invocation
  • TypeScript 54%
  • Nix 46%
2026年06月26日 08:41:22 +02:00
.gitignore Make the app ready for Deno Deploy 2026年06月01日 16:45:25 +02:00
api.d.ts Initial commit 2026年06月01日 14:37:39 +02:00
config.d.ts Initial commit 2026年06月01日 14:37:39 +02:00
deno.jsonc Make the app ready for Deno Deploy 2026年06月01日 16:45:25 +02:00
deno.lock Make the app ready for Deno Deploy 2026年06月01日 16:45:25 +02:00
flake.lock Add a flake.nix 2026年06月01日 19:13:21 +02:00
flake.nix fix services.yaoibot.serverType option description 2026年06月26日 08:41:22 +02:00
main.ts Remove newline from access token 2026年06月02日 13:31:56 +02:00
README.md Add a flake.nix 2026年06月01日 19:13:21 +02:00

YaoiBot

A bot that posts random Yaoi to the fediverse upon invocation.
What else is there to say?

Active at https://mastodon.social/@yaoibot

Setup

Create .env, containing the following keys:

BASEURL=Fediverse server domain
ACCESS_TOKEN=Fediverse development access token
SERVER_TYPE=Server kind, one of: mastodon, pleroma, friendica, firefish, gotosocial, pixelfed

You should then schedule deno run -P --env-file main.ts to execute in your chosen interval (note the rate limits for both Danbooru and your Fediverse server).

The project is also ready to deploy to Deno Deploy. Just set the environment variables, and you're good to go!

NixOS

If you use NixOS, this repository provides a Flake for you to add to your system configuration.
You can then configure the service using services.yaoibot. A systemd timer is created automatically.

Program flow

Upon launch, the bot logs in to the server using the access token provided in the configuration. It then fetches a random SFW Yaoi post off Danbooru, uploads the image to the server, and creates a post containing the image as well as interesting metadata, such as the original source, author, and depicted characters. After making the post, the script exits.

Forking

The script is designed to be easy to modify to your needs (perhaps you want an enbykissing bot, or change some filters).

The getDanbooruRandom function accepts filters as an array of strings or string tuples. Strings are inserted into the query verbatim, while tuples are added as key-value pairs.

If you really want to, you can even use the implemented functions as Danbooru API bindings.