Good morning everyone! I’m going to start work today on creating a Game Day Bot for lemmy. If anyone has any experience with the existing GDBs on reddit, please reach out to me.
I’ve struggled to find the open-source version of the code for the r/baseball (and teams’) bots and am planning on using this NHL one I found as a template.
It’s not a lot of work but it would be a whole lot easier to just fork and update than write all the boiler plate from scratch. If someone could share the existing source code for the popular GDBs I will do just that so new mods can fork a lemmy-specific version.
An author of the Game Thread bots reached out to me on reddit and was kind enough to share his source code for redball, a bot platform he wrote.
I spent some time thumbing through the Redball code, and it looks like it is tied pretty tightly to the praw library. I’m thinking the simplest first step is to clone that interface. I just can’t shake thinking that there is already someone doing the same :)
Haha I feel that same thing. I’ve been checking on github and the matrix server for a lemmy python client but haven’t found anything.
We have a typescript one that is pretty well documented. It might be easier to convert this into a python version. It won’t be extensive as praw but will work
Yes, I was looking at that. Praw is huge - I figured we could focus on just implementing the methods used by redball. My thought is then we won’t need to touch the redball code much at all, mostly just changing out the Reddit text references.
Agreed. We really just need to login (to get the auth token) and the
GetPost
andEditPost
methods for the basic game day bot. I am not a python developer so what I’ve been working on is just a hack to get this to work, not a praw replacement 😁I am interested in seeing how the redball templates look in lemmy once I get it working.
FYI: One of the lemmy devs, Sleepless One, just confirmed he doesn’t know anyone working on a python client.
I’ll leave you to it then. Let me know if there is anything you’d like me to take a look at.
See I thought there might be an issue with the template compatibility. Looks like something isn’t quite right here.
I’m interested in helping out here. Do you have a github up?
Yup! Here’s my fork. We’re working on a PR into the main redball repo now. @cerevant@lemmy.world AKA @philly_bot@fanaticus.social and I are discussing dev on discord.