diff --git a/src/mlpccg/draft/bot.ts b/src/mlpccg/draft/bot.ts index 1d443ea..081b177 100644 --- a/src/mlpccg/draft/bot.ts +++ b/src/mlpccg/draft/bot.ts @@ -5,6 +5,7 @@ export class DraftBot { assign(player: SessionPlayer) { player.on("available-picks", cards => { const pick = this.pick(cards); + // setTimeout hack to avoid handlers being called before the rest of the code setTimeout(() => player.pick(pick.ID), 0); }); }