Skip to content

Commit 43a399c

Browse files
committed
Add an explanation to !predict when trying to predict against AIs
1 parent dfb520e commit 43a399c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ZkLobbyServer/autohost/Commands/CmdPredict.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ public override async Task ExecuteArmed(ServerBattle battle, Say e)
4747
.GroupBy(u => u.AllyNumber)
4848
.Select(x => x.Select(p => Account.AccountByName(db, p.Name))).ToList();
4949

50+
if (teams.Count < 2)
51+
{
52+
await battle.Respond(e, $"!predict needs at least two human teams to work");
53+
return;
54+
}
55+
5056
var chances = RatingSystems.GetRatingSystem(cat).PredictOutcome(teams);
5157
for (int i = 0; i < teams.Count; i++)
5258
{

0 commit comments

Comments
 (0)