def load_person_by_discord_id_or_username(person: str, season_id: int = 0) -> Person:
    # It would probably be better if this method did not exist but for now it's required by the API.
    # The problem is that Magic Online usernames can be integers so we cannot be completely unambiguous here.
    # We can make a really good guess, though.
    # See https://discordapp.com/developers/docs/reference#snowflakes
    # Unix timestamp (ms) for 2015-01-01T00:00:00.0000    =       1420070400000
    # Unix timestamp (ms) for 2015-01-01T00:00:00.0001    =       1420070400001
    # Unix timestamp (ms) for 2015-02-01T00:00:00.0000    =       1422748800000
    # Unix timestamp (ms) for 2100-01-01T00:00:00.0000    =       4102444800000
    # Discord timestamp (ms) for 2015-01-01T00:00:00.0000 =                   0
    # Discord timestamp (ms) for 2015-01-01T00:00:00.0001 =                   1
    # Discord timestamp (ms) for 2015-02-01T00:00:00.0000 =          2678400000
    # Min Discord snowflake for 2015-01-01T00:00:00.0000  =                   0 (                                        00000000000000000000000 in binary)
    # Min Discord snowflake for 2015-01-01T00:00:00.0001  =             4194304 (                                        10000000000000000000000 in binary)
    # Min Discord snowflake for 2015-02-01T00:00:00.0000  =   11234023833600000 (         100111111010010100100100000000000000000000000000000000 in binary)
    # Min Discord snowflake for 2100-01-01T00:00:00.0000  = 5625346837708800000 (100111000010001001111110010010100000000000000000000000000000000 in binary)
    # Discord snowflakes created between 2015-01-01T00:00:00.001Z and 2100-01-01T00:00:00.000Z will therefore fall in the range 2097152-5625346837708800000 if created before the year 2100.
    # We use 2015-02-01T00:00:00.000Z (11234023833600000) as the start of the range instead because it greatly reduces the range and we have seen no evidence of Discord snowflakes from before December 28th 2015.
    # This function will fail or (very unlikely) return incorrect results if we ever have a player with a Magic Online username that falls numerically between MIN_DISCORD_ID and MAX_DISCORD_ID.
    MIN_DISCORD_ID = 11234023833600000
    MAX_DISCORD_ID = 5625346837708800000
    if person.isdigit() and int(person) >= MIN_DISCORD_ID and int(person) <= MAX_DISCORD_ID:
        return load_person_by_discord_id(int(person), season_id=season_id)
    return load_person_by_mtgo_username(person, season_id=season_id)