Random for redraft, weighted lottery balls for keeper and dynasty leagues.
Built for deep leagues: 12, 14, even 20 teams in dynasty and keeper formats fit in one draw instead of being split up.
A brand-new league should run a flat randomizer. Nobody has a record yet, so every manager gets the same shot at the first pick.
Because a baseball season is long, the standings at the end usually mean something. That makes a weighted lottery a natural fit: assign lottery balls by finish, and the teams that ground through a rough year get a real edge at the top pick without it being automatic.
The generator sets the order, so it works however you actually draft. In a snake league the order runs forward then reverses each round. In an auction league it sets the nomination sequence. In a keeper league, run the lottery among only the teams that missed the playoffs and slot the rest by finish.
Keep it sealed until the league is together: everyone opens one link, a countdown runs out, and each manager can have their own pick emailed to them at that moment.
Same generator, any league of 6 to 20 teams, in any format — snake, auction, keeper or dynasty.