Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Give Pats Fedibot

Bot for Mastodon(-compatible) and Misskey(-compatible) federated social media, which pats tagged users =3

Inspired by

clickable btw

(Planned) Features

  • Create and send GIF, where tagged user's profile picture gets patted
  • Create, add to an instance and send custom emoji, where tagged user's profile picture gets patted (Misskey-only)
  • Automatically create pat emojis for every user on the same instance where this bot is hosted (Misskey-only)
  • Automatically update pat emojis when user's profile picture updates (Misskey-only)

How to use

  1. Install Bun, ffmpeg (for converting weird formats to .png), webp (for extracting frames from animated .webps) and Node.js (weird, I know, but without it one of the modules fails to install)

  2. Download the latest release for the stable version or clone the repo for the latest version

  3. cd into the cloned repo

  4. Run bun i

  5. Define env vars INSTANCE_URL, ACCESS_TOKEN, SOFTWARE and BOT_USERNAME if you are using Mastodon

    INSTANCE_URL holds URL of the instance the bot will operate on with http(s):// in the beginning and without the trailing slash.

    ACCESS_TOKEN holds API token given by your instance when you have created the app.

    SOFTWARE defined which driver to use, supports misskey and mastodon.

    BOT_USERNAME is the username of the account without the @ in the beginning on behalf of which the bot will operate. This is required only if you use Mastodon (SOFTWARE=mastodon) since Mastodon's API does not allow you to get the account the bot operates on for some reason.

    If you are using Misskey, you can also define MISSKEY_MODE, which allows bot to generate either GIFs (gif) or custom emojis (emoji). If not set, the bot will default to generating GIFs.

    Examples of .env file:

    INSTANCE_URL=https://twink.men
    ACCESS_TOKEN=somerandomaccesstokendidyouthinkthatiwouldgiveyouaccesstokenyoucheekyperson
    SOFTWARE=misskey
    MISSKEY_MODE=gif
    INSTANCE_URL=https://soc.ua-fediland.de
    ACCESS_TOKEN=hahahahadidyoureallythoughtthatiwouldgiveyouaccesstokenthistimehaventyoulearnedyourlesson
    SOFTWARE=mastodon
    BOT_USERNAME=givepats
  6. Run bun run src/index.ts

Beyond basics

If you want to run the bot as a systemd daemon, consult the official Bun guide

About

Fediverse bot, which pats tagged users =3 (GitHub mirror from Codeberg)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages