this post was submitted on 09 Aug 2023
70 points (98.6% liked)

Ask Lemmy

26933 readers
916 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics. If you need to do this, try !politicaldiscussion@lemmy.world


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS
 

I'm a software developer, and I'm currently noodling around with the idea of a small suite of software to help me moderate a couple communities. Right now, the features I'm thinking of are:

  • Lemmy bot integration - the suite would require a bot account.
  • Some kind of content moderation (detecting things like spam, bigotry, etc.) to flag for me to review. Similar to the mod queue on that other site.
  • Automatic removal of certain kinds of content. I figure this would be configurable, like you could choose whether your community is for text posts, for links, for videos, for pics, or some combination of everything.
  • Domain blacklists and whitelists.
  • Moderation record keeping - in other words, a database to keep track of bans, warnings, reports, etc.
  • Canned automatic messages, which would be useful to send when banning, unbanning, responding to certain types of queries, and so on. So if you use the software to ban someone, they automatically receive a notification about what they were banned for, and for how long.
  • Scheduled automatic posts, which would be configured with *.md files for content. Good for things like monthly meta threads.
  • Controls for the bot via JSON objects in private messages, which would direct it to follow commands.
  • Some kind of configurable user commands for the bot. (Haven't really figured out what this would look like yet.)
  • A simple web interface for all of this.

That's what I'm considering so far, but I'd love to get more ideas from the broader Lemmy community, and will post it on Github if it comes together.

The technology stack I'm considering is:

  • Node/Typescript
  • The lemmy-bot library
  • Sequelize for the database
  • Nest.js for the web backend
  • [TBD] for the web frontend (I hate React, so not that. Probably either Vue or Angular)
  • Docker for containerization

So what features would other Lemmy mods like to see in a Lemmy moderation suite like this?

Edit: OK, I've had a chance to take a look at the code for the existing Lemmy "automoderator" bot that's in progress, and I think I'm still leaning towards working on one of my own, partly because it looks like there's a real desire for Lemmy bots that use Node. I think there's room for two or more in the fediverse. And hopefully, we can all learn from each other. I know I'm bookmarking the Python bot and watching to see how it improves.

Anyway, I'd like to thank everyone for the suggestions! I'm hoping to get started on it this weekend. We'll see how it goes.

top 18 comments
sorted by: hot top controversial new old
[–] j4k3@lemmy.world 16 points 1 year ago* (last edited 1 year ago)

At this point, start ultra simple. Just a notification that tells me when posts are added to the community. Make it just like the comment reply notification. Maybe show me the whole post title in the notification so I get an idea if I should drop what I'm doing to check it out or get to it when I get to it.

Going way out the way on crazy features, maybe flag the notification with a different color for posts by users that have less than 5 posts or their account was recently created within the last few days.

[–] Bluetreefrog@lemmy.world 8 points 1 year ago* (last edited 1 year ago) (1 children)

Something similar to this is already in development.

It's written in Python and utilizes the Pylemmy library to access the API.

So far it:

  • Uses a deep neural network and a custom training dataset to detect toxic content (the training data out there wasn't really very suitable)
  • Has a hard-coded regexp flagging tool. It shouldn't be hard to make that more dynamic.
  • Has a probation list to flag users who are 'being watched'.
  • Will report comments/post for mod action.
  • Will send a message to a selected Matrix room.
  • Keeps track of previously assessed comments/posts using SQLite..

It's actively being developed and I intended for it to get a lot more configurable and feature rich.

Happy for anyone to contribute (I would actually really appreciate it).

https://github.com/noenfugler/LemmyModBot

PS: It's running on this community right now.

[–] kescusay@lemmy.world 1 points 1 year ago (1 children)

Oh! Neat! I'll check it out. Maybe it's time to brush up on my python skills.

[–] BarterClub@sh.itjust.works 6 points 1 year ago (1 children)

Ability to message mods. A lot of what automod on Reddit can do.

[–] kescusay@lemmy.world 1 points 1 year ago

That's basically the goal: A better and more configurable automod.

[–] bappity@lemmy.world 4 points 1 year ago (1 children)
  • Some kind of content moderation (detecting things like spam, bigotry, etc.) to flag for me to review. Similar to the mod queue on that other site.

regex matching for flagging / deleting phrases would be cool

[–] kescusay@lemmy.world 2 points 1 year ago

That and perhaps some fuzzy logic of some kind to detect toxic content were basically what I had in mind, although from the looks of it, this community already has a bot for that which I wasn't aware of, written in Python. So perhaps my efforts would be better spent contributing to that one instead of rolling my own.

[–] beefbaby182@lemmy.thesanewriter.com 2 points 1 year ago (1 children)

Let me get in touch with the other mods of this community, but you may be interested in our discord server. We have one mod currently working on a toxicity bot.

[–] kescusay@lemmy.world 3 points 1 year ago (1 children)

Looks like that mod responded here as well. I'm going to check out your bot. No sense reinventing the wheel.

Additionally, one of the admins of this instance is working on a site wide automod. The Lemmy world discord server is open to the public now, I believe.

[–] Zonetrooper@lemmy.world 2 points 1 year ago

Modnotes. Right now we don't have a good and simple way to track repeated offenders.

[–] SnowdenHeroOfOurTime@unilem.org 1 points 1 year ago (1 children)

Angular? Kind of shocked people still use that. I legit didn't think people did. Curious what's better than react about vue?

[–] kescusay@lemmy.world 2 points 1 year ago (1 children)

Angular is actually really popular inside large corporate environments. As soon as you start making something really large, with potentially hundreds of routes, it's much easier to manage than the stitched-together crap you have to deal with in the React world. React is easy for startups that need a functional page quickly, but it's a nightmare to build out an actual large, multi-faceted site with.

As for Vue, it sort of exists in a halfway state between being a full framework (like Angular) and giving you more tooling choice (like React). I'd say it's a good choice for when you want to build something simple that has growth potential without becoming too unmanageable if its feature set explodes.

React, which I have to work with regularly for my job, gives me heartburn. Just keeping the dependencies updated is a pain in the ass. With Angular you've got... Angular. And that's basically it. With React you've got React, and axios/cross-fetch/isomorphic-fetch, and redux, and babel, and relay (ugh), and bluebird, and... It's just endless. And they all update on different schedules, and some share dependencies on different versions of the same libraries, and React's documentation is still terrible, and if I never have to look at an ugly function with eleven layers of nested JavaScript and JSX code that can't be split into smaller component chunks because of some stupid reason or other...

Sorry, I'm starting to rant. I think React has been a net negative for web development. It made quick and simple pages easy to create at the expense of ludicrous complexity as soon as you need to make your web app actually useful.

[–] SnowdenHeroOfOurTime@unilem.org 1 points 1 year ago (1 children)

I appreciate all of this perspective.

I have never worked with angular, but I've seen many talks on it. Imo it feels really rigid, and like it's not even js. I felt like when I interviewed candidates who had worked a lot with angular, they struggled to understand normal JavaScript and were fixated instead on how angular does things.

I tried vue and simply hated it with my entire soul. The syntax is enragingly confusing for me. Also doesn't feel like JavaScript.

I was pretty resistant to react but I guess in the end, the flexibility it affords is why I don't hate it. It feels like JavaScript. Have you tried next.js? I feel like it's a big help with a lot of react's pain points. Also typescript with next.js helps so much with the "stringed together mess" feeling you mentioned.

[–] kescusay@lemmy.world 2 points 1 year ago (1 children)

In some ways, you're absolutely correct about Angular as far as its rigidity is concerned. It's a framework, not a view library, which means it wants you to do things the Angular way. It wants you to lay out your file structure in a particular way, it wants you to use its integrated tooling, and so on.

That said, it's still just a Typescript framework, which, yeah, isn't JavaScript, but that's not a drawback unless you don't like Typescript. If you're comfortable in Typescript, any sense of rigidity in Angular kind of evaporates, and you start seeing its structure as guardrails that prevent problems, instead of restrictions on creativity.

At my work, our frontend is React, and there isn't a single developer on the team who wouldn't switch to Angular in a heartbeat if we could.

Regarding Next.js, I've played around with it, and it's not bad. The thing is... It actually strongly resembles Angular in the structure and utilities that it brings to the table. I think if you have to use React, it's probably the best way to do it, especially if you're also using Typescript. But honestly, the fact that you like Next.js and Typescript tells me you might not hate Angular as much as you may think if you tried it.

They work basically the same way. You have a CLI that creates your initial app and settings, it gives you sane defaults for folder structure, it comes with routing and HTTP clients built in, etc. The best thing about Next.js is that it gets rid of the majority of that dependency hell I mentioned, and Angular has always had that.

Anyway, I really appreciate that we can have this conversation without tearing each other's throats out! People can get so hot under the collar about their preferred development tools, but I've always been of the opinion that people should just use what they like and let everyone else do likewise.

[–] SnowdenHeroOfOurTime@unilem.org 1 points 1 year ago (1 children)

Thanks for the reply. Yeah, perhaps I would feel differently about Angular now. The thing I didn't like so much was the ng- attributes for everything. Maybe that isn't even a thing anymore.

And yeah, I agree about having a discussion here -- I attribute this largely to a better community on Lemmy. On Reddit, it seemed like so many people were super rude and I think I got a bit that way myself. Here, I find myself being more charitable despite disagreements that can happen.

[–] kescusay@lemmy.world 2 points 1 year ago

There are a few ng attributes still, but if you're used to seeing ng- - as in, with the hyphen - then that's the old version, AngularJS, which is very different. Today, the ng attributes are mostly for interactive stuff, like iterating over an array or allowing a button to trigger a method on an Angular class. It's pretty similar in concept, if not execution, to the way you call JavaScript from inside JSX elements.

I guess one way to look at it is that in order to glue together markup and code, you either have to have some markup in code (the JSX way) or some code in markup (the Angular way). It's mostly a matter of taste, in my opinion.

And yeah, I agree about having a discussion here – I attribute this largely to a better community on Lemmy. On Reddit, it seemed like so many people were super rude and I think I got a bit that way myself. Here, I find myself being more charitable despite disagreements that can happen.

YES, absolutely. Couldn't have said it better. I think Reddit was already becoming toxic before it imploded, and I'm not sure why. Heck, you and I are both refugees from it, and here we are, having an extremely friendly conversation without going after each other despite minor points of disagreement.

Feels really great, honestly. It's a breath of fresh air.