this post was submitted on 11 Jul 2023
12 points (92.9% liked)
Lemmy Support
4651 readers
17 users here now
Support / questions about Lemmy.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
!hdev@lemmy.world has an automod bot, I'm just testing it too. Lemmy.world's api is inconsistent, but maybe that won't be a problem on your instance.
@Rooki@lemmy.world ?
That implies that it's not a native feature. I gotta find the API docs then...
Edit: Looks like there is an easy-ish API. Examples:
You have to fetch every comment every post every few minutes and save the ids somewhere.
I suggest you ( if you are a js programmer ) https://github.com/SleeplessOne1917/lemmy-bot , it fetches the newest posts, comments and saves it for persistency in a database, so that you dont get every 30 seconds notified.
If you want i can set up the bot for you or just guide you how you could do it :) If you want i can even host the bot on my server.
edit: if you want you can do it over with curl but its difficult because it sends you every post. not unread ones. ( and search sort for "new" for best results )
Thanks dude. I'm going to try the curl route. What do you mean by it sends you every post? Isn't that what I want?
Yeah but you would have to know what posts are new and not already known.
That's what saving the IDs is for right? It's easy enough to do in a bash script I think. I'll post it here later, assuming I get it to work.
But i would not know how to save the ids there. But good luck :)
Here ya go. ChatGPT did all the hard work: https://chat.openai.com/share/7703dbe5-6801-4d5b-8d56-c3f18ca3ac4a
Edit: here's a manually refined version: https://gist.github.com/binwiederhier/70f13b7c7338a2b75e15438b5567a6d6
Ah ok now i know how to save things in files with bash :)