this post was submitted on 06 Dec 2023
29 points (93.9% liked)

Lemmy Bots and Tools

448 readers
2 users here now

Welcome to the programming.dev lemmy development community! This is a place to discuss and show off bots, tools, front ends, etc. you're making that relate to lemmy

Theres another version of this community over at lemm.ee if you want to subscribe to that one as well

Icon base by DarkZaitzev under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

How does one make a Lemmy bot? A couple of communities I moderate could benefit from a bot to post regular threads based on a template or respond to comments which contain key phrases.

How and where are Lemmy bots hosted? What language are they written in? I have some basic coding experience with Python/Bash/C++, but am not sure where to start when it comes to something like this.

Are there any good step-by-step guides for building a Lemmy bot?

all 10 comments
sorted by: hot top controversial new old
[–] zeppo 7 points 11 months ago

I'm not sure which is the best or most active, but there are several open source Lemmy bots you could check out to get an idea, or just use an existing one or fork it. This one for instance, lemmy-bot

[–] [email protected] 5 points 11 months ago* (last edited 11 months ago) (1 children)

Theres a lot of different frameworks to use for creating them

The most popular one is lemmy-bot which uses js (and has descriptions for how to use it on the page)

Theres also one in python though here with a couple examples in its repo

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (1 children)

Looks like lemmy-bot uses TypeScript, but I guess that's close enough to JavaScript for most purposes.

[–] [email protected] 2 points 11 months ago

Uses typescript but can be used for both js and ts, I make bots in Javascript using it

[–] [email protected] 4 points 11 months ago* (last edited 11 months ago) (1 children)

I personally use php and host them on AWS serverless, it costs almost nothing.

Edit: Consider checking out https://schedule.lemmings.world for regular thread posting.

[–] [email protected] 3 points 11 months ago (1 children)

That's a bit of an advanced methodology.

@[email protected] Don't feel overwhelmed if this one is a bit over your head when looking at the details of it's implementation.

@[email protected] when visiting https://schedule.lemmings.world/, being greeted immediately by a third party asking for your login information is a bit jarring and requires trust. Maybe consider a landing page that has some more information about what's going on and a link to the git repo could be helpful.

[–] [email protected] 7 points 11 months ago (2 children)

Perhaps you're right, on the other hand I stopped caring after about the 5th time someone accused me of trying to steal their precious credentials.

I know better use of my time than convincing people that no, I'm not stealing anything, it's just Lemmy devs being incompetent and not having any other way for 3rd parties to authenticate.

[–] [email protected] 3 points 11 months ago

As someone who's always curious about how things are implemented I always appreciate a link to a git repo being offered up front.

A landing page could also curtail some of those accusations until something better comes along with Auth0 or similar support. But also people are going to complain no matter what you do.

[–] [email protected] 1 points 11 months ago

Thanks for your work, by the way, it works great!