Skip to content
gh674055 edited this page Dec 3, 2023 · 181 revisions

The nhlcompare bot is currently not working. The NHL API has recently undergone a lot of changes and I haven't had the chance to update the bot yet

This page is for information generic to all the comparison bots. For information specific to each bot check out the bot's wiki page

Format

To start a comparison, make a comment on reddit or send a message to the bot in the following format:

!mlbcompare <Players To Compare> [Query Options]

!nflcompare <Players To Compare> [Query Options]

!nhlcompare <Players To Compare> [Query Options]

Query options are optional, without them the comparison will be over each player's regular season career

The bot will not automatically pick up edits to a comment, even ninja edits. You'll need to send it the linked message telling it to re run. Same with deletes.

You can only have one comparison per comment

It will NOT work with chats, just messages

Players To Compare

A comma separated list of players to include in the comparison, up to 30 players. Although I wouldn't suggest getting anywhere close to that number because eventually the comment will become too large for reddit and the image will start getting blurry. This just uses Sports-Reference's search page, so anything that works on there should work with the bot.

Type Example
By Name Mike Trout, Bryce Harper
By Full Name Michael Nelson Trout, Bryce Aron Max Harper
By Nickname. Note that a match by actual name will always come before a nickname. For example "Goldy" would return Purnal Goldy not Paul Goldschmidt
Also Note that Hockey Reference seems to have pretty much no nicknames, only one I've seen is Ovi
TB12, The Sheriff, Big Ben
By Player ID ahose01, ahose02
Combining Player Stats Ruth + Gehrig, Aaron + Eddie Matthews

Query Options

These query options will work with any of the bots. Each bot's own page will have the options specific to that bot

Multiple query options can be used which will AND the options together

Type Explanation Examples
Career The default comparison when there's no option provided, over the players entire regular season career career, (when there's no option provided)
Season Comparison over entire seasons or season ranges. Can use MIN or MAX as shortcuts. For NHL this refers to the starting year of the season, so 2010 refers to the 2010-2011 season 2019, 2010-2015, min-2002, 2009-max
Season shortcuts Shortcuts to grab first/last seasons First 4 seasons, Last season, last year
First/Last Seasons Automatically compare all the players first/last X seasons, based on the player with the least amount of seasons first-seasons, last-seasons
Date Comparison between a specific date range. Can use MIN or MAX as shortcuts 2019-11-03 TO 2019-12-01, MIN TO 2015-10-27, 2016-12-04 TO MAX, 1976-12-09
Date shortcuts Shortcuts for various date ranges, and can optionally do calendar dates. For example last week will get you the last 7 days including today's date. Last calendar week will get you the last full Monday-Sunday week closest to today's date Last week, Last 7 months, Last 3 days, First week, Last calendar week, Last 2 calendar months, Last 3 calendar years
Age Only include games before, after, or through a players age. Can also do an age range before age 30, after age 25y172d, through age 35, age 20-25
Season Age Same as age, but based on entire season age instead of specific date rage. Season age is calculated using the same method as Sports-Reference before season-age 30, after season-age 35, through season-age 28, season-age 20-25
Current Age Includes games based on the age of the youngest player in the comparison current-age
Current Season Age Includes seasons based on the age of the youngest player in the comparison current-season-age
Games First or last games. By default career games, but can specify a specific season. Can also specify a range instead of first/last First 200 games, Last 20 games, first 6 games 2012, games 50-100, games 50-100 reversed
Starts Can have any comparison only include starts, or only include non starts starts, last 10 starts, first 20 games no starts
First/Last Games Automatically compare all the players first/last X games (or starts), based on the player with the least amount of games first-games, last-games, first-starts
Playoffs The default for almost every option is to only show regular season stats, but you can get any comparison to only include playoff stats or include both playoffs and regular season stats combined. For the NHL playoff years change to refer ending year of the season, so 2010 refers to playoffs of the 2009-2010 season playoffs, 2010 playoffs, Last 20 games including playoffs
Playoff shortcuts Shortcuts to only grab certain playoff rounds World Series, Stanley Cup, Super Bowl, League Championship (MLB), Conference Finals (NHL), Conference Championship (NFL), Division Series (MLB), Second Round (NHL), Divisional (NFL), Wild Card (MLB and NFL), First Round (NHL), Play In/Qualifying Round/Round Robin (NHL)
League Playoff shortcuts Can specify a certain league for the shortcuts ALCS (MLB), AFC Championship (NFL), Eastern Conference Finals (NHL)
Series Game Only grab certain playoff series games (doesn't work for NFL)
Note that for MLB you can actually get this (and the other playoff series options) to work with regular season series, although unlike most options it isn't the default. You'll need to add "regular season" or "with playoffs" to the query.
series-game:7, series-game:1-4, series-game-3 regular season
Elimination/Clinching/Winner Take All Only grab elimination, clinching, or winner take all playoff games (doesn't work for NFL). Based on games where the player's team could be potentially eliminated or clinch the series elimination, clinching, elimination-or-clinching, winner-take-all, last 3 years elimination
Ahead/Behind/Even In Series Only playoff games the player's team was ahead, behind, or even in the series (doesn't work for NFL) ahead-in-series, behind-in-series, last 3 years even-in-series
Location Can have any comparison only be for home/away games away, 2016 away, last 10 home starts
Arena/Stadium Only include games played in a specific arena(s)/stadium(s). You will need to spell the names as they appear on MLB.com, PFR, and NHL.com. Use a ~ to match multiple stadiums
Note by default renames will be treated as the same arena/stadium. If you query on Minute Maid Park, Astros Field, or Enron Field the same games will come back regardless of what the stadium name was at the time. If you do an exact search instead it will match based on the name at the time of the game
stadium:(fenway park), 2012 arena:(nassau coliseum), stadium:(gillette~lambeau), stadium:(yankee stadium 1), stadium:(Minute Maid Park), exact-stadium:(Minute Maid Park)
Game Detailed Location Splits based on the location the game was played in. Countries use the two letter abbreviation. States only work for the US and CA (provinces). Specific time zones use tzdata names country:JP, state:CA, city:(New York), city:(Los Angeles~San Francisco), eastern-time-zone, central-time-zone, pacific-time-zone, time-zone:America/New_York
Team/Opponent Detailed Location Splits based on the location of the player's team or opponent's home stadium team-country:CA, opponent-state:NY, team-city:(New York), opponent-city:(Los Angeles~San Francisco), team-pacific-time-zone, opponent-time-zone:America/Los_Angeles
Start Time Splits based on the start time of the game. Time zone options are ET, CT, MT, and PT. start-time:(2PM-6PM ET), start-time:(7:45PM-9:30PM PT)
Local Start Time Splits based on the start time of the game, in the time zone the game was played in local-start-time:2PM-6PM, local-start-time:7:45PM-9:30PM
Team/Opponent Start Time Splits based on the start time of the game, in the time zone of the player's team or opponent's home stadium team-start-time:2PM-6PM, opponent-start-time:7:45PM-9:30PM
Team Games played for a specific team. Treats franchises that are renamed as separate teams, so the Los Angeles Angels (LAA) are a different abbreviation than the Anaheim Angels (ANA). Based on the team abbreviations used by Sports Reference T:LAA, 2018 T:MNS-ARI
Opponent Games played against a specific team. Treats franchises that are renamed as separate teams, so the Los Angeles Angels (LAA) are a different abbreviation than the Anaheim Angels (ANA). Based on the team abbreviations used by Sports Reference O:LAA, 2018 O:MNS-ARI
Team Franchise Similar to Team, but franchise renames are treated as the same franchise. So ANA will bring back both the Los Angeles and Anaheim Angels. Based on the franchise abbreviations used by Sports Reference. Be careful because the franchise abbreviations can be outdated (i.e. the Angels are "ANA" not "LAA") TF:ANA, 2018 TF:DAL-PHX
Opponent Franchise Similar to Opponent, but franchise renames are treated as the same franchise. So ANA will bring back both the Los Angeles and Anaheim Angels. Based on the franchise abbreviations used by Sports Reference. Be careful because the franchise abbreviations can be outdated (i.e. the Angels are "ANA" not "LAA") OF:ANA, 2018 OF:DAL-PHX
Rookie Can have any comparison only include games the player was rookie-eligible Rookie
First/Second half Can have any comparison only include the first or second half of seasons. For seasons with an all star game the date of the game determines first/second half. For seasons without an all star game (or any NFL season), the season is just cut in half to determine first/second half First-half, second-half, 2017 first-half
Pre/post all-star Similar to First/Second half, but will completely skip seasons without an all star game. Will not work for NFL Pre-All-Star, Post-All-Star
Even/Odd Year Stats in even/odd seasons only even-year, odd-year
Season Number Only include entire seasons where a player wore a certain number(s) for a team number:4, number:5-9, season-number:4
Game Number Only include games when a player was wearing certain number(s). This is only useful if a player wore different numbers for a team during the same season, and is much slower than season number. Will not work for NFL. For MLB the data is pretty spotty until 2011 game-number:4, game-number:5-9
Stat Can have any comparison only include games where a player had a certain stat value, or multiple.
Note this (and the other stat query options) will not work with "advanced stats" (wRC+, Rate+, AdjG, etc) as the bot doesn't have the horsepower to calculate these many times
Stat:HR, Stat:PIM=2, Stat:TD=2-4, Stat:G=2-MAX, stat:Yds=MIN-99
Season Stat Same as stat, but brings back matching full seasons instead of individual games season-stat:MVP, season-stat:WAR=4, season-stat:TD=30-40, season-stat:G=50-MAX, season-stat:Yds=MIN-1000
Max Stat Can find the game, week, month, or season where the player had the max value for a stat. For example find the best 5 season stretch in terms of batting average a player had, best 10 game stretch in terms of goals, etc. Can also do "Min-Stat" for the worst stretch. Max-Stat:AVG:Seasons5, Max-Stat:G:Games10
Max Streak Can find the longest game or season streak where a player had a certain value for a stat Max-Streak:HR, Max-Streak:G=2
Formula Can provide a custom formula, like how often a player had more Ints than TDs in a game. Will follow pythonic formula syntax. Note you need to escape special characters like '+'s with a backslash formula:{Int > TD}
Playing with Can have any comparison only include games playing with a specific player(s). You can also use "starting-with" to only include games both players started playing-with:(mike trout), starting-with:(peyton manning), playing-with:(crosby~letang)
Playing against Can have any comparison only include games playing against a specific player. You can also use "starting-against" to only include games both players started playing-against:(mike trout), starting-against:(lundqvist), playing-against:(crosby~letang)
Season Game Can have any comparison only include a specific season game or game range. Season-Game:1-8, 2015 Season-Game:7, 2018 Season-Game:6-10
Team Game Can have any comparison only include a specific season team game or game range. Team-Game:1-8, 2015 Team-Game:7, 2018 Team-Game:6-10
Career Game Can have any comparison only include a specific career game or career game range. Career-Game:7, Career-Game:50-100
Days/Games/Starts Rest Can have any comparison only include a games where a player had a specific amount of days/games/starts rest. 2015 Days-Rest:7, 2018 games-rest:6-10, starts-rest:1-8
Days/Games/Starts In A Row Can have any comparison only include games where a player played a specific amount of days/games/starts in a row, including the given game 2015 Days-In-A-Row:3, 2018 Games-In-A-Row:2-4, Starts-In-A-Row:1-3
Result Can have any comparison only include games the player won/lost/tied Win, 2018 Loss, Tie
Month Can have any comparison only include during a specific month, or a range of em December, 2018 June-July
Temperate Season Can have any comparison only include during a season. This is determined by the equinox/solstice days of that year summer, winter, fall, spring
Day Can have a comparison only count games played on a certain day, or a range of them Sunday, 2018 Saturday-Sunday
Date Can have a comparison only count games played on a certain day of month, or a range of them Dt:1st, 2018 Date:20th-21st
Dates Can include games that only occurred in an arbitrary list of dates dates:(01/01/2000 ~ 12/12/2001 ~ 02/02/2003)
Holiday Can bring back games on a certain holiday. Should work with a good amount of US holidays holiday:(Thanksgiving), holiday:(Fathers Day)
Birthday Can have any comparison only include games on a players birthday Birthday, 2018 Birthday
Facing Former Team/Franchise Game facing a player's former team/franchise. Will only count teams a player actually played a game with facing-former-team, facing-former-franchise
Official Various splits based on the game official official:(ed hochuli), referee:(ed hochuli), linesman:(Greg Devorski), umpire:(Joe West), home-plate-umpire:(Joe West~Angel Hernandez)
Opponent Quality Various methods of querying against opponents with a certain record, based on the opponents record at the end of the season (or current record for in progress seasons) winning-opponent, losing-opponent, winning-or-tied-opponent, playoff-opponent, division-winner-opponent, opponent-win-percent:.600, opponent-games-over-500:10-max
Current Opponent Quality Various methods of querying against opponents with a certain record, based on the opponents record at the start of the game current-winning-opponent, current-losing-opponent, current-winning-or-tied-opponent, current-opponent-win-percent:.600, current-opponent-games-over-500:10-max
Moon Phase Stats on days with a given moon phase as of 7 PM ET. For Full/New/First Quarter/Third Quarter moons that occur in the morning, we will also include the previous day full-moon, waxing-gibbous
Attendance Games with certain attendances. Note usually we cannot differentiate between games with zero attendance and games where attendance data was not given, so you usually want to start with 1 attendance:1-29999, attendance:30000-max
Negation Options can be negated, pulling back only results which don't match the option. Not O:BAL, Not playing-with:(peyton manning), not 2015
Combination Can combine options together stanley cup + conference finals, summer + fall, tuesday + thursday + saturday
Difference Can also find the difference between options. For example finding out how much better a player does at home vs away. This will do percent change, so you'd get the percent increase in a player's home stats vs away. Only makes sense doing 2 values home diff away
Best/Worst Seasons Special mode where you'll see the best/worst season stretch the player had for each stat. The stretches can be different for each stat show-best-season, show-worst-season:3
Seasons Leading Special mode where you'll see how often a player led the league, or finished in the top X, of each stat. Only works up to top 10 show-seasons-leading, show-seasons-leading:5
Blind Comparisons Special mode where you can hide the name of the players, the date range the players played, the query ran, or a combination of the three hide-names hide-dates hide-query
Show Dates By default the comparison will only show you the date range the query matches (i.e. 2020-04-03 to 2021-05-12). You can instead show each individual date. Will look ugly with a lot of dates, only a max of 20 can be shown show-dates
Show Games Show the stats for each game in the query separately instead of combined together. Will look ugly with a lot of games, only a max of 20 can be shown show-games
Show Stats Some stats are hidden by default, but can be configured to be shown through the query. These include the team record or team score in games the player has played in. For stats with matches in multiple different tables (or all 5v5 NHL stats) you can designate the table name with a '>', otherwise we find the match in the first table. I can't really put all of these here to feel free to ask if there's something the bot can show show-record, last 20 games show-score, show-stat:(IBB%), show-stat:(A2-EVA2-PPA2-SHA2), show-stat:(Yds), show-stat:(Rushing>Yds), show-stat:(5v5>A2)
Show Only Stats/Tables Tell the bot to only show certain stats or entire tables, the rest will be hidden. This can be helpful if you are comparing a ton of players and hit the max length of a reddit comment show-only-stat:(PA), show-only-stat:(G-A-P), show-only-stat:(Rushing>Yds), show-only-table:(Standard), show-only-table:(Adjusted)
Hide Stats/Tables You can tell the bot to hide certain default stats or entire tables you aren't interested in. This can be helpful if you are comparing a ton of players and hit the max length of a reddit comment hide-stat:(PA), hide-stat:(G-A-P), hide-stat:(Rushing>Yds), hide-table:(Standard), hide-table:(Adjusted)
Sorting The default sort order is the order the players appear in the command, however you can change this to sort by certain stats. The default ordering is on stats where a higher number is better higher values will come first, but on stats where a lower number is better lower values will come first. This can be reversed. You can also provide multiple stats to order on in case there is a tie sort-by:(HR), sort-by:(ERA;Rev), sort-by:(P-G), sort-by:(Rushing>TD-Rushing>Yds;Rev), sort-by:(5v5>G)
Escaping Certain reserved characters, like '+'s and '-'s, must be escaped with a backslash if they appear in certain options. Reddit will hide the backslash so don't freak out if its missing from your comment stat:wRC\+:200, sort-by:(ERA\-)

Examples

Command Explanation Resulting Image
!mlbcompare <Kershaw, Verlander, Scherzer>[2016-now playoff starts] How each pitcher did in playoff starts, from 2016 to now https://i.imgur.com/fYVydfK.png
!nflcompare <Brady, Peyton Manning, Rodgers>[home October-December] How each QB did in home games from October to December https://i.imgur.com/9iBsIyE.png
!nhlcompare <Crosby>[first round, second round, conference finals, stanley cup] Crosby's splits across the 4 different playoff rounds https://i.imgur.com/uDmqHAg.jpg
!mlbcompare <Trout, Bonds, Mantle>[tuesday night summer before age 30 not O:NYY] How each player did in tuesday night summer games, before turning 30, excluding games against the Yankees because why not https://i.imgur.com/Y0jPnT2.png
!nflcompare <derrick henry, zeke elliot, dalvin cook>[stat:YDS=100 show-record] Each RBs stats in games they rushed for 100+ yards, including team record https://i.imgur.com/MWdnxb8.png
!nhlcompare <lundqvist, price, fluery, luongo>[first 10 elimination games] Each goalies stats in their first 10 elimination games https://i.imgur.com/lJIciE5.png
!nflcompare <brady, manning, rodgers, brees>[show-seasons-leading:5 first 16 seasons] How often each player finished top 5 in each stat over their first 16 seasons https://i.imgur.com/uyiSDW8.jpg
!mlbcompare <acuna, tatis jr, soto>[last 162 games hide-names hide-dates] Blind comparison of each player's last 162 games https://i.imgur.com/dnb8XWL.png

Search Results

I use my own sorting method when multiple players come back in a search. The two biggest factors are if a player is currently active or made the HOF, however it also takes into account making all star games/pro bowls, career length, etc. If the comparison isn't bringing back the right players, usually you can get the right one by specifying a full name (William Michael Smith vs William Dills Smith). In even rarer cases where full names are exactly the same, you can use Sports Reference IDs (ahose01 vs ahose02).

Certain stats not appearing?

There's a couple reasons why this could be happening:

  1. In general there are three modes with the bot, stats by season (including splits by team), stats by game, and stats by play. Some stats only appear in in certain types, like WAR and awards only appear if you do stats by season.
  2. If a stat wasn't tracked for the entirety of the time frame for each player in the comparison it will hide that stat. For example if you compare Wayne Gretzky to Mario Lemieux it won't show any 5v5 stats because those weren't tracked during their careers.
  3. The awards table wont show up if none of the players in the comparison have any awards. This is to save space instead of showing a table full of zeros.

Bot not responding?

Couple things it could be:

  1. I don't have the bot looking for comments on all of reddit, just a specific list of subs. If you think you are trying to use it on a new subreddit just hit me up and I'll add it to the list
  2. The bot can't pick up edits, even ninja edits, so if you initially mess up the summoning command (!mlbcompare, !nflcompare, !nhlcompare) you're gonna be out of luck
  3. Reddit could be having issues processing comments, you can check out https://www.redditstatus.com and if there's problems try again later
  4. You may have gotten unlucky and I was just pushing up new updates when you made the comment, so just try again
  5. Finally there could be a bug, but it's been a while since there were any bugs with skipping comments. But if you think that's happening definitely open an issue or message me

If you hit any of these you could manually send a message to the bot telling it to rerun (put "rerun" as the subject and the comment ID as the body), but at that point its probably easier to just make a new comment. It's not the easiest thing to find a comment's ID. If you message me I can do the rerun for you

Reddit Accounts

mlbcomparebot

nflcomparebot

nhlcomparebot

Sweetpotatonvenison (Non-bot account I actually use reddit with and check for messages)

General Usage/Testing

To just randomly use the bot you can send a message to right bots account. I also usually have a thread up on the bots subreddit for testing