this post was submitted on 10 Sep 2023
65 points (97.1% liked)

Hockey

2432 readers
1 users here now

Rules

List of Team-Specific Communities:

Metropolitan Division

Atlantic Division

Central Division

Pacific Division

founded 3 years ago
MODERATORS
 

Hi All

I am currently in the early stages of working on a GDT bot for this community. I wanted to communicate early in case any one else started working on the same thing so we can combine our efforts instead of duplicating them. This is for the community, so I wanted to know the community's thoughts on what features are important or not, or if there are any features that you want.

I am taking heavy inspiration from the reddit GDT bot for formatting and feautres, but definitely don't expect all of those features right at launch. Questions for the community:

  • Are there any features that you wished the reddit GDT bot had?
  • Are there any features that you wished the reddit GDT bot didn't have, say if it is a distraction or takes up too much space on the screen?
  • How would you feel about having the bot leave a comment with additional info instead of cluttering up the main body? (not sure if this is possible with the Lemmy API I am using)

My goal is to have a functioning minimum viable product by the preseason so I can test it out during the preseason and have it ready by the first day of the season. I can run full tests with historical data now, as the NHL API lets me pull data from all old games (which is amazing, btw!), but I am sure I am going to have issues with creating posts and updating the post bodies, and the testing of that feature sounds tricky without live data updating.

Current minimum viable product features planed:

  • Post GDTs 30 minutes or 1 hour before the start of each game
  • Title contains the teams playing and the start time of the game (in the Eastern Time Zone?)
  • Body contains the score, game clock, other basic stats, and updates throughout the game.
  • Body contains who got each goal, along with who got each assist
  • Possibly have some details like the status of the game (Not started yet, In progress, completed) in the title
  • Open source so anyone can contribute
  • UNIT TESTS
  • Self-hostable via container, so if another hockey community on another instance wanted to have a GDT bot, they would just need to change a few variables in a .env file and host it themselves.

Edit: I wanted to provide an update on my progress. I posted the source code on github here. I also have tested it on a community in my own instance here. Since there are no games currently going on, this game is a random one I chose from last season. It's actually this one

all 19 comments
sorted by: hot top controversial new old
[–] Bobicus@lemmy.zip 12 points 1 year ago

Just wanted to say it’s awesome of you to take this on. Much appreciated!

[–] Yazer@lemmy.ca 9 points 1 year ago (1 children)

That would be epic. Thanks

[–] nexas_XIII@lemm.ee 5 points 1 year ago

Yup, it doesn't have to be perfect but I'm looking forward to GDTs again!

[–] socphoenix@midwest.social 7 points 1 year ago (1 children)

Check out lemmy nhl bot I made for the flyers community

[–] dandroid@dandroid.app 3 points 1 year ago* (last edited 1 year ago) (1 children)

Thank you, I will take a look at this for reference!

[–] socphoenix@midwest.social 4 points 1 year ago (1 children)

It’s mit licensed feel free to use/crib as you see fit! (Also feel free to ask to pull features if you want too lol, I won’t say no to help)

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

Absolutely. If there's anything I'm working on that I think will benefit your repo, I'll make sure to do that.

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

I've already got an idea for a PR to this repo. I'll fork it and make a commit or two between work and my own game(s) tonight.

[–] dandroid@dandroid.app 2 points 1 year ago (1 children)

Awesome! Thanks for the help! If you have any questions or need any help, I can share my matrix or discord.

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

I have neither, but I'll PM with any questions. As someone who basically lives in Python professionally, I'm glad to be able to use it for something fun for once!

[–] dandroid@dandroid.app 2 points 1 year ago (1 children)

I... uh... might get nervous with people that are actually good at python looking at my code. I'm a Java developer professionally, and you are going to be able to tell by my design decisions. I'm a little too attached to OOP. But I'm sure that if people who are better at python are involved, it will only have positive effects.

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

I mean, Python's also OOP so I'm not in a position to criticise.

[–] dandroid@dandroid.app 2 points 1 year ago (1 children)

Yes, and I use it pretty heavily when I program in Python. I just know some guys that came from Python 2 prefer not to use OOP.

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

Python 2

WHY?! I want to rip my hair out.

[–] dandroid@dandroid.app 1 points 1 year ago* (last edited 1 year ago) (1 children)

I ripped my hair out a long time ago

(this joke would be funnier if you could see that I am bald)

[–] Rumblestiltskin@lemmy.ca 1 points 1 year ago (1 children)

Where will you host the open source code? I will try to contribute.

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

I have the source code on github here. It's still early and pretty rough. There are a lot of features that still need to be added, but that's my start. You can watch my progress by looking at !test@dandroid.app. I have a test post I have been working with here. In this post, I am using an old game from last year, since there are none currently going. It is this one.

My next features that I am going to implement (hopefully in the next day or two) are create the initial post one hour before the game starts and to stop editing the post some time after the game is over. I am still trying to decide how exactly I am going to do the latter, and after how much time after the game has ended, since the NHL API may continue to update data for some time after the game ends to correct mistakes after reviewing replays and such.