MLB Game Feed Bot: Difference between revisions

From ChewWiki
Jump to navigation Jump to search
add some history
de-knowledgebase-ify the page and add categories
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 MLB (Major League Baseball) API and track live game data, much like the MLB's ''Gameday''. It is written in JDA, a Java Discord library. As of July 10th, 2024, it is in over 1,100 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>[https://github.com/Chew/MLB-GameFeed-Bot/commit/d87913277ff2ba37ea5c4844985d28a700c10dad Initial gradle by Chew on GitHub]</ref>, but the first code was committed the following day on June 17th, 2022<ref>[https://github.com/Chew/MLB-GameFeed-Bot/commit/e0da85726b26ac0d5dbc663f4c24943d5bfddabd Iteration one of game feed by Chew on GitHub]</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.
 
This command shows the score of the active game. It shows the current amount of outs and the inning, as well.
 
==== <code>/setinfo</code> ====
 
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.
 
==== <code>/plangame</code> ====


This command "plans" a game. Using the arguments, you can select a game to pick and it will show an embed with the game time, the teams' records, probable pitchers, and where to watch it. There are buttons below the embed to start the game, but only within 30 minutes of the start time, a refresh button to update, and buttons to view the lineup.
== External Links ==


== History ==
* [https://help.chew.pro/bots/discord/mlb-game-feed MLB Game Feed on ChewHelp]
 
The bot started off inspired by the MLB Chat Discord server's own bot. Chew began development on June 16th, 2022<ref>[https://github.com/Chew/MLB-GameFeed-Bot/commit/d87913277ff2ba37ea5c4844985d28a700c10dad Initial gradle by Chew on GitHub]</ref>, but the first code was committed the following day on June 17th, 2022<ref>[https://github.com/Chew/MLB-GameFeed-Bot/commit/e0da85726b26ac0d5dbc663f4c24943d5bfddabd Iteration one of game feed by Chew on GitHub]</ref>. 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.


== References ==
== References ==
[[Category:Discord Bots]]
[[Category:Projects]]
[[Category:Programs written in Java]]
[[Category:Active projects]]

Revision as of 05:34, 11 July 2024

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, a Java Discord library. As of July 10th, 2024, it is in over 1,100 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.

External Links

References