CustomGame.RemoveAllBots(int slot)
Syntax
public bool RemoveAllBots(
    int slot
)

Removes all AI from the game. Input slot must be an AI.

Unless you know the input slot will definitely be an AI, I reccommend using RemoveAllBotsAuto().