this post was submitted on 04 Aug 2023
5 points (85.7% liked)

Lemmy Bots and Tools

455 readers
1 users here now

Welcome to the programming.dev lemmy development community! This is a place to discuss and show off bots, tools, front ends, etc. you're making that relate to lemmy

Theres another version of this community over at lemm.ee if you want to subscribe to that one as well

Icon base by DarkZaitzev under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

Hi folks, so glad this channel is here.

Recently, I:

  • Created a community called fullmoviesonyoutube on lemm.ee
  • Decided I wanted to write a bot to post helpful comments when people post movies there.
  • Created another community called fullmoviesbottesting.
  • Created a user on lemm.ee called fullmoviesbot
  • Wrote and tested the bot from my PC using the lemmy-bot as a starting point, pointing it at that 'fullmoviesbottesting' community, until I was finally pretty happy with it.
  • Updated the bot's code so the federation - allowlist points to 'fullmoviesonyoutube' on the same lemm.ee instance.
  • Ran the bot, created a post with my personal lemmy account.... and nothing happened.

The bot is not creating comments in the new channel. It's like it doesn't see posts created by any other users.

Is there something I need to do to get my bot to recognize posts from other users in the new channel?

I did a test where I logged into lemm.ee in my browser with the bot's user, and created a post and the bot created a comment on that post, but for some reason, that bot-created post doesn't show up in the community. This is that "orphaned" post: https://lemm.ee/post/2896238

I guess another way to ask this - what are the rules for bot's when it comes to creating comments on other user's posts?

EDIT


Here's the full code: https://controlc.com/dd54eae6

(it's rough - don't judge me) Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] ClanOfTheOcho@lemmy.world 2 points 1 year ago (1 children)

For the record, Strange Brew is an awesome movie.

Are you using any sort of automated web testing framework to do the work, or did you custom roll your own? Or are you using some sort of API? Your methodology may narrow down the issue.

[–] perishthethought@lemm.ee 1 points 1 year ago (1 children)

Yes, yes it is.

I started with the "Congratulations bot" example on this project, using this as the library. It runs on Node JS. https://github.com/SleeplessOne1917/lemmy-bot

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

Some things to think about:

  • Does the bot need to be a moderator?
  • Does the same behavior occur if you log in through the web with the bot's account?

And maybe you've already thought of these and tried them. It's past my bedtime, so my brain isn't chugging along at full power. It's as though my brain is telling me, "Take off, eh, you hoser!"