From 4f3ad1d63a83216b61bf9613de19e578ab938061 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Thu, 27 Jun 2019 17:12:39 +0200 Subject: [PATCH] Forgot to add the API object --- draftbot/draftbot.go | 1 + draftbot/main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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") }