SleeplessOne1917 / lemmy-bot

A bot library for Lemmy, the fediverse link aggregator.
https://www.npmjs.com/package/lemmy-bot
GNU Affero General Public License v3.0
93 stars 11 forks source link

No editComment or editPost Bot Action? #35

Closed PennyJim closed 1 year ago

PennyJim commented 1 year ago

I'm looking into making a bot that lets commenters vote on what genres apply to the story and then locks it and logs it into a database that will (probably) be web-accessible. I, admittedly, have not worked on it at all yet, but I'm imagining the comment will be updated to reflect what genres have been accepted and (maybe) a link to find more like it.

If there's no way to edit a comment via this (or any other) library, then this project will be a non-starter and probably dropped before it's even started.

Pdzly commented 1 year ago

The same issue with getPersonDetails. A workaround you have to create a new lemmy-js-client instance and use that for your needs

Pdzly commented 1 year ago

i can help you on creating such Bot, if you want to ;) Hit me up on discord: roooooooooooooooooooooooooooooki (Its the new format )

SleeplessOne1917 commented 1 year ago

I'm looking into making a bot that lets commenters vote on what genres apply to the story and then locks it and logs it into a database that will (probably) be web-accessible.

Would the post that users are voting on be made by the bot, or someone else? Accounts can update their own posts and comments, so if the post is made by the bot that can be doable. If you want it to update a post made by a different person, I don't think Lemmy's API supports that.

PennyJim commented 1 year ago

If you want it to update a post made by a different person, I don't think Lemmy's API supports that.

The bot would be either creating or using a comment on each relevant post (non-meta). The only thing I would've hoped to be able to change is tags on the parent post, which is not yet implemented at all in Lemmy. This bot would simply be a moderator in it's own right. Can moderators not yet mark a post nsfw if it's incorrectly marked?

SleeplessOne1917 commented 1 year ago

Can moderators not yet mark a post nsfw if it's incorrectly marked?

I don't think so, however there isn't much documentation on Lemmy's API so it's hard to tell.

PennyJim commented 1 year ago

Can moderators not yet mark a post nsfw if it's incorrectly marked?

I don't think so, however there isn't much documentation on Lemmy's API so it's hard to tell.

Alright. I'm going to assume that eventually non-static post metadata will probably be alterable by moderators. Maybe it'll have a log for it, but I see benefits for non-abusing moderators being able to fix wrongfully or maliciously set values rather than just nuking the offending post.

SleeplessOne1917 commented 1 year ago

Please make an issue on the Lemmy server repository if you'd like to see that supported in the API. Your idea sounds like it could be very useful to moderators.

PennyJim commented 1 year ago

Done: LemmyNet/lemmy#3566 (after verifying with some moderator that they can't already do it: https://lemmy.world/post/1232021)

Pdzly commented 1 year ago

I added those functions to the botactions. Should be available after the next release :)

PennyJim commented 1 year ago

I see it in commit c44dc15 I will go ahead and close this issue