pub async fn run_external_bot<B, F>(
factory: F,
options: RunExternalOptions,
) -> Result<Vec<MatchResult>, Error>Expand description
Run a bot on the Chipzen external-API remote-play path.
Connects to the lobby, then plays every match the platform dispatches to
this bot (a single challenge, or every round of a tournament) until the
lobby closes, the bot is evicted, or max_matches matches complete.
factory produces one bot instance per match. Pass a closure that
returns a fresh bot (|| MyBot::default()) for correct per-match state
when matches may overlap; the same closure can capture-and-clone shared
config. Each match runs in its own task on its own gateway socket.
Returns one MatchResult per match played this session.
ยงErrors
Error::Protocolif no token can be resolved, or neitherurlnor abot_idis available to build the lobby URL.Error::BotDecisionifdecide()panics undersafe_mode = false.