this post was submitted on 18 Jul 2023
5 points (85.7% liked)

Lemmy Bots and Tools

448 readers
1 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
 

I'm new to lemmy, only been here a few days, but I have already ported over one of my reddit bots to Lemmy and it was really easy, like orders of magnitude easier than it was to get my first reddit bot working.

There are lots of wrappers available and I am researching everything to figure out how best to proceed with a more serious bot. Most of my scripts for reddit were moderation tools. Lemmy doesn't seem large enough to need a lot of moderation yet, but I still want to get to work creating things because it's fun.

I'm finding documentation scarce in some cases so I just wanted to pose a question here. On reddit, if I want to look at posts (or comments, reports, modqueue, and so on) I iterate through a listing and then narrow my search based on what type of post I need.

Does Lemmy use listings, or how do you process posts/comments in the same fashion as you'd do over there?

I haven't had to take any mod actions yet because I don't have any reports, so I haven't really explored any of the mod actions via the api.

top 2 comments
sorted by: hot top controversial new old
[โ€“] BuckRowdy 2 points 1 year ago* (last edited 1 year ago)

I think I may have answered my own question. It appears that instead of using listings, this data is stored as keys in a dict. It looks like effectively you would do something like this in python.

    posts = lemmy.post.list(community_name=moderated, sort="New")
    for post in posts["posts"]:
       # do something
[โ€“] [email protected] 1 points 1 year ago

Don't have an answer to your question, but just wanted to chime in and say that mod tools seem to be sorely needed! This often comes up in community discussions, and any contributions would be very welcome.