Go to file
Elara 375e9684c0 Clarify which regex engine is used 2022-12-10 20:16:10 -08:00
.gitignore Initial Commit 2022-12-10 20:08:29 -08:00
LICENSE Add GPLv3 license 2022-12-10 20:09:13 -08:00
README.md Clarify which regex engine is used 2022-12-10 20:16:10 -08:00
config.go Initial Commit 2022-12-10 20:08:29 -08:00
go.mod Initial Commit 2022-12-10 20:08:29 -08:00
go.sum Initial Commit 2022-12-10 20:08:29 -08:00
lemmy-reply-bot.example.toml Initial Commit 2022-12-10 20:08:29 -08:00
logger.go Initial Commit 2022-12-10 20:08:29 -08:00
main.go Initial Commit 2022-12-10 20:08:29 -08:00

README.md

Lemmy Reply Bot

This project is a simple bot that replies to comments on Lemmy. Every 10 seconds, it fetches the 200 newest comments from your configured Lemmy instance, and sees if they match any regex configured in the config file. If it finds one that does, it replies with the message corresponding to that regex.

Configuration

This repo contains a file called lemmy-reply-bot.example.toml. This is an example config file. Copy it to lemmy-reply-bot.toml and edit it to fit your needs. The config contains your password, so its permissions must be set to 600 or the bot will refuse to start.

This bot uses PCRE2 for regular expressions, so you can use any of PCRE2's features, and Regex101 in PCRE2 mode for testing.

If any regular expressions configured in the file also match the reply messages, the bot will refuse to start because this may cause an infinite loop.

Debugging

In order to enable debug log messages, set LEMMY_REPLY_BOT_DEBUG=1.