AsudoxDev

joined 1 year ago
[–] AsudoxDev@programming.dev 2 points 8 months ago

Vanilla Arch.

[–] AsudoxDev@programming.dev 5 points 8 months ago (6 children)

What source? That was obvious sarcasm.

[–] AsudoxDev@programming.dev 1 points 8 months ago* (last edited 8 months ago)

Here's what you are trying to do, with a one liner:

fn get_links(mut link_nodes: Select) -> Vec<String> {
    link_nodes.retain(|node| node.value().attr("href").is_some()).into_iter().fold(Vec::new(), |links, node| links.push(link.value().attr("href").unwrap().to_string()))
}

The retain method is to get rid of all the nodes which don't have a href attribute and the fold method after it is to extract the href out of the nodes and push them into the vector.

It might work or not, I've written this from my memory and I can't exactly know what that Select is.

I also hope you begin reading The Book without half assing it.

[–] AsudoxDev@programming.dev 7 points 8 months ago* (last edited 8 months ago) (1 children)

No problem calling third parties Russian spies without evidence. But waging a genocide does not make one a Nazi.

I don't care what americans say about third parties, I am not one of them, nor do I want to be one. I simply stated that a nazi is not one who supports genocide, by definition. Would you call helping some random stranger that happens to be supporting trump (which supports genocide) helping a nazi intentionally?

By your logic, anyone that supports genocide is a trump fan, hitler fan, etc.

[–] AsudoxDev@programming.dev 4 points 8 months ago (1 children)

Linux was optimized to be used as a desktop OS?

[–] AsudoxDev@programming.dev 6 points 8 months ago (6 children)

By the actual definition, that is wrong. https://en.wikipedia.org/wiki/Nazism

[–] AsudoxDev@programming.dev 15 points 8 months ago (1 children)

Link to presentation?

[–] AsudoxDev@programming.dev 9 points 8 months ago* (last edited 8 months ago) (8 children)

They are in an illusion where their backend is absolutely perfect, but third party apps like open source keyboards implement spyware that spies on users predictable bank passwords. (FlorisBoard is the biggest predator)

[–] AsudoxDev@programming.dev 11 points 8 months ago

They should upgrade soon. One of the LW admins said that they were waiting for this release.

[–] AsudoxDev@programming.dev 8 points 8 months ago

A new official UI is coming, which might improve the UX.

[–] AsudoxDev@programming.dev 3 points 8 months ago (2 children)

through the lens of Lemmy-UI (IMO the worst way to interact with Lemmy).

Why?

[–] AsudoxDev@programming.dev 5 points 8 months ago* (last edited 8 months ago)

Please explain what it is you are trying to do.

As far as I can understand from the function return value and the body of the function, you are trying to compose all of the href attributes in each node into a single String, which is encapsulated in an Option. Is this correct? Something looks weird but I can't quite catch it. I hope you didn't take a quick glance over the rust book and just started assuming things work like JS in Rust.

33
submitted 11 months ago* (last edited 11 months ago) by AsudoxDev@programming.dev to c/fediverse@lemmy.world
 

cross-posted from: https://programming.dev/post/18411894

Hello Lemmings!

I am thinking of making a community moderation bot for Lemmy. This new bot will have faster response times with the help of Lemmy webhooks, an amazing plugin for Lemmy instances by @RikudouSage@lemmings.world to add webhook support. With this, there is no need to frequently call the API at a fixed interval to fetch new data. Any new data will be sent via the webhook directly to the bot backend. This allows for actions within seconds, thus making it an effective auto moderation tool.

I have a few features I thought of doing:

  • Welcome messages
  • Auto commenting on new posts
  • Scheduled posts
  • Punish content authors or remove content via word blacklist/regex
  • Ban members of communities by their usernames/bios via word blacklist or regex
  • Auto community lockdown during spam

What other features do you think are possible? Please let me know. Any questions are also welcome. Community requested features:

  • Strike system

Strikes are added to a certain member of the community and the member will be temporarily banned within a time period if their strike count reaches a certain threshold

  • Post creation restriction by account age

If an account's age is lower than X, remove the post.

6
submitted 11 months ago* (last edited 11 months ago) by AsudoxDev@programming.dev to c/moderators@lemmy.world
 

cross-posted from: https://programming.dev/post/18411894

Hello Lemmings!

I am thinking of making a community moderation bot for Lemmy. This new bot will have faster response times with the help of Lemmy webhooks, an amazing plugin for Lemmy instances by @RikudouSage@lemmings.world to add webhook support. With this, there is no need to frequently call the API at a fixed interval to fetch new data. Any new data will be sent via the webhook directly to the bot backend. This allows for actions within seconds, thus making it an effective auto moderation tool.

I have a few features I thought of doing:

  • Welcome messages
  • Auto commenting on new posts
  • Scheduled posts
  • Punish content authors or remove content via word blacklist/regex
  • Ban members of communities by their usernames/bios via word blacklist or regex
  • Auto community lockdown during spam

What other features do you think are possible? Please let me know. Any questions are also welcome.

Community requested features:

  • Strike system

Strikes are added to a certain member of the community and the member will be temporarily banned within a time period if their strike count reaches a certain threshold

  • Post creation restriction by account age

If an account's age is lower than X, remove the post.

43
submitted 11 months ago* (last edited 11 months ago) by AsudoxDev@programming.dev to c/opensource@lemmy.ml
 

Hello Lemmings!

I am thinking of making a community moderation bot for Lemmy. This new bot will have faster response times with the help of Lemmy webhooks, an amazing plugin for Lemmy instances by @rikudou@lemmings.world to add webhook support. With this, there is no need to frequently call the API at a fixed interval to fetch new data. Any new data will be sent via the webhook directly to the bot backend. This allows for actions within seconds, thus making it an effective auto moderation tool.

I have a few features I thought of doing:

  • Welcome messages
  • Auto commenting on new posts
  • Scheduled posts
  • ~~Punish content authors or take action on~~ Auto report content via word blacklist/regex
  • Ban members of communities by their usernames via word blacklist or regex
  • Auto community lockdown during spam

What other features do you think are possible? Please let me know. Any questions are also welcome.

Community requested features:

  • Strike system

Strikes are added to a certain member of the community and the member will be temporarily banned within a time period if their strike count reaches a certain threshold

  • Post creation restriction by account age

If an account's age is lower than X, remove the post.

view more: ‹ prev next ›