MLB Game Feed Bot: Difference between revisions

From ChewWiki
Jump to navigation Jump to search
m i really gotta preview the page...
m →‎External links: use github repo url template
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
''MLB Game Feed Bot'' is a Discord bot developed by Chew and is used to hook into the MLB (Major League Baseball) API and track live game data, much like the MLB's ''Gameday''. It is written in JDA (Java).
'''MLB Game Feed Bot''' is a Discord bot developed by [[Chew]] and is used to hook into the Major League Baseball (MLB) API and track live game data, much like the MLB's ''Gameday''. It is written in JDA, a Java Discord library. As of October 2024, it is in over 1,200 servers.


== Features ==
== Features ==
Line 7: Line 7:
=== Commands ===
=== Commands ===


The bot communicates solely though slash commands. There are currently 5 commands. None of the commands have permissions by default. This can be configured in server settings under integrations.
The bot communicates solely though slash commands. There are 7 commands, 4 of which manage or monitors games.<ref>[https://help.chew.pro/bots/discord/mlb-game-feed/commands MLB Game Feed Bot command list]</ref>


==== <code>/startgame</code> ====
Games can be started with the <code>/startgame</code> or <code>/plangame</code> to plan future games. Once a game is active, <code>/score</code> can be used to view the score, and <code>/stopgame</code> can forcibly stop the game; however, the game will stop automatically when it's over.


Starts a game. When you run the command, auto-complete will show currently live Major League games. If a game is final, or currently experiencing a delay, it will not show up. Games appear here usually once a notification goes out (when the game goes into "warm up"). However, if you have a gamePk, you can paste that in and listen to any game. To find a gamePk, you can find a game on [[Chew's MLB Stats|mlb.chew.pw]], and grab the 6 digit number at the end of the URL.
The bot can be configured per-channel with the <code>/config</code> command. And the <code>/setinfo</code> command can be used to set a voice channel's name to certain stats. Finally, <code>/standings</code> can be used to view standings for a provided division.


==== <code>/stopgame</code> ====
== History ==


Use this command to forcibly stop an active game. Games will stop on their own once they reach "Final."
The bot started off inspired by the MLB Chat Discord server's own bot. Chew began development on June 16th, 2022,<ref>{{Cite GitHub|url=https://github.com/Chew/MLB-GameFeed-Bot/commit/d87913277ff2ba37ea5c4844985d28a700c10dad|title=Initial gradle|author=Chew|org=Chew|repo=MLB-GameFeed-Bot|type=commit|commit=d879132}}</ref> but the first code was committed the following day on June 17th, 2022.<ref>{{Cite GitHub|url=https://github.com/Chew/MLB-GameFeed-Bot/commit/e0da85726b26ac0d5dbc663f4c24943d5bfddabd|title=Iteration one of game feed|author=Chew|org=Chew|repo=MLB-GameFeed-Bot|type=commit|commit=e0da857}}</ref> Throughout the rest of the month, fixes and improvements were slowly made. The bot was added to a Texas Rangers fan Discord server.


==== <code>/score</code> ====
At the start of the 2023 season, the bot was in 79 servers; at the end of the season, it was in nearly 600 servers. By opening day of the 2024 season, the server count had risen to over 900 servers. As of now, it sits at around 1,250 servers.


This command shows the score of the active game. It shows the current amount of outs and the inning, as well.
== References ==
[[Category:Discord Bots]]
[[Category:Software written in Java]]
[[Category:Active projects]]
<references />
== External links ==


==== <code>/setinfo</code> ====
* [https://help.chew.pro/bots/discord/mlb-game-feed MLB Game Feed] on [[ChewHelp]]
 
* {{GitHub Repo URL|Chew|MLB-GameFeed-Bot}}
Sets info for a voice channel name. Teams will be autofilled, and, if you search, it will narrow down results. Currently, these are supported:
 
* Next game, formatted as (Date: versus/at opponent, @ team's local time). Example: 10/5: vs NYY, 3:05 PM.
* Standings, formatted as (Team abbreviation: record - rank in division abbreviation). Example: TEX: 68-94, 4th in ALW.
 
==== <code>/config</code> ====
 
Use these commands to get or set the channel's game config. Currently, there are 4 options:
 
* In-Play Delay - Set the delay (in seconds) before a ball in-play is shown to the channel. Default: 13 seconds.
* Out-of-play Delay - Set the delay (in seconds) before a ball not in-play is shown to the channel. Default: 18 seconds.
* Only Scoring Plays - Only show scoring plays.
* Game Advisories - Whether to show game advisories, such as pitching changes or substitutions.

Latest revision as of 03:13, 31 December 2024

MLB Game Feed Bot is a Discord bot developed by Chew and is used to hook into the Major League Baseball (MLB) API and track live game data, much like the MLB's Gameday. It is written in JDA, a Java Discord library. As of October 2024, it is in over 1,200 servers.

Features

The bot allows you to start a live game and have the plays come in when they're posted to the endpoint. By default, in-play events have a 13 second delay, and plays that don't (strikeouts, walks, etc) have a 18 second delay. This can be configured per channel, as desired. These times were chosen as they closely line up with the play happening live on TV, to prevent spoilers. Watching a game in-person, there is a few second delay before the result is posted to the API.

Commands

The bot communicates solely though slash commands. There are 7 commands, 4 of which manage or monitors games.[1]

Games can be started with the /startgame or /plangame to plan future games. Once a game is active, /score can be used to view the score, and /stopgame can forcibly stop the game; however, the game will stop automatically when it's over.

The bot can be configured per-channel with the /config command. And the /setinfo command can be used to set a voice channel's name to certain stats. Finally, /standings can be used to view standings for a provided division.

History

The bot started off inspired by the MLB Chat Discord server's own bot. Chew began development on June 16th, 2022,[2] but the first code was committed the following day on June 17th, 2022.[3] Throughout the rest of the month, fixes and improvements were slowly made. The bot was added to a Texas Rangers fan Discord server.

At the start of the 2023 season, the bot was in 79 servers; at the end of the season, it was in nearly 600 servers. By opening day of the 2024 season, the server count had risen to over 900 servers. As of now, it sits at around 1,250 servers.

References

  1. MLB Game Feed Bot command list
  2. Initial gradle by Chew in Chew/MLB-GameFeed-Bot @ d879132
  3. Iteration one of game feed by Chew in Chew/MLB-GameFeed-Bot @ e0da857

External links