Lemmy is divided into a backend API and a front-end user interface. You can either make a bot that is specific to Lemmy by programmatically using the backend API, or hypothetically make an agnostic bot that works over the ActivityPub interface.
I want to, but I am trying to find a way to make a private backup of my saved comments/threads before I do. I have a lot of useful stuff that I saved over the last 12 years that I really don't want to lose. Some have suggested making a GDPR request, but since I am not in the EU Reddit technically doesn't have to comply. Automated tools I have found only purge my data with no way to make a backup first.