You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
aka_dude c5ffeaa5de
Add docker image
3 months ago
app Use LMDB for storage 3 months ago
nix Add docker image 3 months ago
.gitignore Add README 6 months ago
README.md Add docker image 3 months ago
cabal.project Use LMDB for storage 3 months ago
flake.lock Use LMDB for storage 3 months ago
flake.nix Add docker image 3 months ago
fourmolu.yaml Init 6 months ago
misskey-autorenote-bot.cabal Use LMDB for storage 3 months ago

README.md

Misskey Autorenote Bot

A very simple bot that renotes every note that mentions it. Example instance (as per 06.07.2023) - https://shitpost.poridge.club/@b.

Building with Nix

Executable

nix build will create ./result symlink with bin/misskey-autorenote-bot.

Docker image

nix build .#image will create ./result symlink to Docker image. You can load it with docker load < misskey-autorenote-bot-exe-misskey-autorenote-bot-*.tar.gz.

Alternatively, you can download a prebuild image with docker pull git.poridge.club/aka_dude/misskey-autorenote-bot:latest (I do not guarantee that image is up to date with code).

Environment

  • MISSKEY_TOKEN - token for bot to use.
  • MISSKEY_URL - URL of instance to use, without /api. Example: https://shitpost.poridge.club.
  • MISSKEY_KEYWORDS - keywords that will trigger renote (list of strings separated by newlines).
  • MISSKEY_LOG (optional) - log level. One of Debug, Info, Warning, Error. Default is Debug.
  • MISSKEY_POLLING_DELAY (optional) - polling delay in milliseconds. Default is 1000.
  • STATE_DIRECTORY must contain directories separated by semicolon. A directory ending with "database" will be used to store state. This variable is set by systemd (see example below).

Example systemd unit file

[Unit]
After=network.target

[Service]
Environment="MISSKEY_URL=https://shitpost.poridge.club"
Environment="MISSKEY_TOKEN=XXX"
Environment="MISSKEY_LOG=Info"

ExecStart=/home/user/misskey-autorenote-bot/result/bin/misskey-autorenote-bot
Restart=always
RestartSec=5s
StateDirectory=database

Example Docker Compose configuration

services:
  misskey-autorenote-bot:
    image: git.poridge.club/aka_dude/misskey-autorenote-bot:latest # or locally created image as explained in section Docker image
    environment:
      MISSKEY_URL: https://shitpost.poridge.club
      MISSKEY_TOKEN: XXX
      # MISSKEY_KEYWORDS: |
      #   #hashtag1
      #   #hashtag2
      #   #hashtag3
      # MISSKEY_LOG: Debug
      # MISSKEY_POLLING_DELAY: "10000" # 10s
    volumes:
      - type: volume
        source: misskey-autorenote-bot-database
        target: /database
volumes:
  misskey-autorenote-bot-database: