Basic draft library #19
1 changed files with 1 additions and 0 deletions
|
@ -5,6 +5,7 @@ export class DraftBot {
|
||||||
assign(player: SessionPlayer) {
|
assign(player: SessionPlayer) {
|
||||||
player.on("available-picks", cards => {
|
player.on("available-picks", cards => {
|
||||||
const pick = this.pick(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);
|
setTimeout(() => player.pick(pick.ID), 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue