this post was submitted on 31 Aug 2023
51 points (87.0% liked)

Asklemmy

43907 readers
1487 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy πŸ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
 

I used code from a github repo to make a lemmy repost bot from a reddit sub.

I tested it out, it seemed OK. So I let it run over night.

When I got back I found out it had been posting the same thing over and over again every few minutes. The account was banned for spam. But in the meantime it was very annoying to people. Also, there are a bunch of posts that can't be removed because it's impossible to remove federated stuff.

Is there a responsible way to test this stuff?

I don't want to make spam, be annoying, etc. I feel bad about the spam bot.

all 25 comments
sorted by: hot top controversial new old
[–] empireOfLove@lemmy.one 48 points 1 year ago* (last edited 1 year ago)

Yes. Host your own Lemmy instance. It's not that hard and can be run locally with no federation.

[–] redballooon@lemm.ee 47 points 1 year ago (3 children)

Technical problems aside, no one wants repost bots from Reddit. Nothing makes people unsubscribe faster from a sub than a ton of bot posts without comments.

[–] Franzia@lemmy.blahaj.zone 8 points 1 year ago

I thought these bots would be useful to quickly steal and or crosspost the content. But crossposting is... imperfect, and the bots arr far more annoying than useful. Oof.

[–] maengd@sh.itjust.works 3 points 1 year ago

Ya I planned for it to be in a separate community from the native fediverse. Idea was to allow people to sub to the reddit repost if they wanted.

It is lucky that I did that because otherwise this oopsie spambot thing might have got the native community in trouble, people unsub, reported, banned etc.

[–] Chozo@kbin.social 1 points 1 year ago (2 children)

How is that any different from organic posts without comments, though?

[–] redballooon@lemm.ee 11 points 1 year ago* (last edited 1 year ago)

Ideally posts and comments are somewhat in a relationship. For a community with little traffic, posts will occur scarcely, and few subscribers will add and read comments in their time.

If the community has few subscribers but many posts, any commented posts will be scrolled down so much that engagements stagnates.

So yes, you are right. If a small community has a single human poster who posts all the time without commenters engagement, it’s the same problem.

But a bot almost guarantees that any community it posts runs into that situation. You can’t automate human engagement.

[–] rufus@discuss.tchncs.de 5 points 1 year ago

And if you comment on a organic post, at least the original author is probably gonna read it. Engaging with a bot post is just wasted time typing something out that noone will ever read.

[–] kersploosh@sh.itjust.works 20 points 1 year ago* (last edited 1 year ago) (1 children)

There are communities specifically for testing. Maybe one of them would be willing to have you? Or make your own testing community?

!test@sh.itjust.works

!test@lemmy.ca

!test@lemmy.ml

[–] empireOfLove@lemmy.one 24 points 1 year ago (2 children)

It won't fix the spam problem if stuff goes south though with things like repost bots. That's a lot of excess traffic. OP definitely should host their own instance.

[–] kersploosh@sh.itjust.works 7 points 1 year ago

Good point. I'm with you.

[–] squaresinger@feddit.de 2 points 1 year ago

Or just ask an admin of your instance for permission. Regarding traffic, Lemmy has rate limiting. Ask me how I know.

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

As an old programmer, always build in checks for your systems. Keep a cache of posted articles and check it before posting so you know you haven't posted this one yet.

When you let something run overnight, that's going to go south somehow. If running overnight for the first time, throttle it to one post per hour. And not the same post. I'm the morning you check if it successfully posted a new article once per hour. Next let it post a little more frequently. Ease into your desired frequency once you have figured out all your edge cases and scale issues.

And so forth.

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

Also, don't let it run against the live system the first time. Implement a "dry run" option which doesn't post to Lemmy, but writes to a file or something similar. This way you can make sure nothing goes wrong in the parts aside from the Lemmy integration.

I was going to add this but figured I had already given too many points. This is the way, though.

[–] oleorun@lemmy.fan 5 points 1 year ago

This is great advice, and to the OP, don't feel bad. You're really not an IT person of any caliber until you have experienced when I like to call the "Production Incident Experience", or PIE. IT work is a job with unforseen consequences and hurdles, and we've all run into them at one point or another.

This being a learning experience, do what we've all done and learn from it. Now you can set up logging, whatif, sandbox instance, whatever you have to do.

You're on the road to becoming a good programmer - just learn from your mistakes, do your research on best practices, ask intelligent questions, and in no time at all you'll be writing one of these posts yourself.

[–] freamon@endlesstalk.org 8 points 1 year ago* (last edited 1 year ago) (1 children)

I think https://enterprise.lemmy.ml is specifically for testing. It's not typically federated with other instances, so it won't be a problem if your bot goes crazy again.

this page also mentions https://voyager.lemmy.ml/ and https://ds9.lemmy.ml/

[–] maengd@sh.itjust.works 2 points 1 year ago* (last edited 1 year ago) (2 children)

voyager and ds9 are front ends for lemmy

Lemmy has an HTTP API for clients and frontends.

For others, see https://github.com/dbeley/awesome-lemmy

I don't think they help anything here. But thanks :)

edit: I can't tell what enterprise.lemmy.ml is for? anyone else?

[–] freamon@endlesstalk.org 3 points 1 year ago (1 children)

Bots are clients that use the HTTP API

Voyager was set up to test the app, but that doesn't mean other clients can't use it.

Enterprise is full of random test communities that have many been populated by bots. I don't understand how something like https://enterprise.lemmy.ml/c/mels_test (to pick a random one) isn't useful for what you're trying to do.

[–] CommunityLinkFixer@lemmings.world 2 points 1 year ago (1 children)

Hi there! Looks like you linked to a Lemmy community using a URL instead of its name, which doesn't work well for people on different instances. Try fixing it like this: !mels_test@enterprise.lemmy.ml

[–] freamon@endlesstalk.org 3 points 1 year ago

Speaking of bots that should have some checks built in, ha.

[–] lemming934@lemmy.sdf.org 2 points 1 year ago

These instances are specifically made for people testing code that interfaces with Lemmy. This includes front ends and bots.

You should not use any communities on real instances since people will see your testing on their local page.

[–] telepresence@discuss.tchncs.de 7 points 1 year ago (1 children)

good call asking for a proper venue to test this, but how do you mean you can't remove federated stuff? i was under the impression (from lemmy's homepage) that one of the features is 100% complete deletion by replacing post/comment content with 'removed by user'. is this not the case?

[–] dandroid@dandroid.app 3 points 1 year ago

Can you make your own community? If no one is subscribed to it, it shouldn't federate anywhere, right?

[–] intensely_human@lemm.ee 3 points 1 year ago

stub out collaborating servers and test it in isolation. Run it on a vm with limited network access.