this post was submitted on 07 Oct 2023
4 points (100.0% liked)

meta

90 readers
3 users here now

A place for admins, mods, and community members to talk about fanaticus.

Let me know what you guys think about the instance, if you have any issues you want to raise publicly, or if you have any feature requests.

founded 1 year ago
MODERATORS
 

Not a tech guy, can't code or anything. Just created a Real Madrid community here and would love to deploy one (pls join if you’re a football fan or curious).

Idk if I can do it but i'd love to hear how it's done.

top 2 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 10 months ago (1 children)

Sorry, I was going to post an update thread and just saw this post. The game bots work in two parts:

  1. Some sort of scheduler that keeps track of games and posts on lemmy
  2. Access to the specific sport's/team's API

A team's bot like for the Real Madrid community would need access to that team's data (e.g. what games are scheduled when). It gets that data by requesting it from an API. Once it knows when the games are scheduled, the bot can create a post at the appropriate time. The bot will also request specific data about the game (e.g. goals, penalties, etc.) in order to write the post.

The bot basically runs on a loop. It wakes up, checks if there's a game on. If there is one, it creates a post. If it already created a post, it queries for fresh data and updates the post.

The main roadblock for creating new bots is the access to real-time data via an API. Sports leagues often lock this data down and only offer an API to major players in the industry (like sports gambling or media outlets) and charge massive amounts of money for access.

Sorry for the very late reply but I hope that helps!

[–] [email protected] 2 points 9 months ago

Thats really cool. Thanks for the explanation!