diff --git a/draftbot/draftbot.go b/draftbot/draftbot.go index c1f2529..8223ffa 100644 --- a/draftbot/draftbot.go +++ b/draftbot/draftbot.go @@ -27,6 +27,7 @@ type BotInterface interface { func newDraftBot(botAPI BotInterface, name string) *draftBot { return &draftBot{ + API: botAPI, Name: name, Sessions: make(map[string]session), } diff --git a/draftbot/main.go b/draftbot/main.go index 29accc1..6841db0 100644 --- a/draftbot/main.go +++ b/draftbot/main.go @@ -82,7 +82,7 @@ func runBot(name string, games, tags []string) error { } draftbot := newDraftBot(wsbot, name) - wsbot.Listen(draftbot.onMessage) + return errors.New("eof") }