diff --git a/README.md b/README.md index 6c28a47..4aab41e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ import ( ) func main() { - bot := twitchbot.NewBot("oauth:abcdef", "mybot", []string{"channel"}) bot.OnMessage(func(bot *twitchbot.Bot, message *twitchbot.Message) { diff --git a/twitchbot/bot.go b/twitchbot/bot.go index 977915c..4409409 100644 --- a/twitchbot/bot.go +++ b/twitchbot/bot.go @@ -132,13 +132,8 @@ func (bot *Bot) Run() { } func (bot *Bot) Start() error { - err := bot.client.Connect(bot.host) - if err != nil { - return err - } - defer bot.client.Close() - err = bot.client.Connect(bot.host) + err := bot.client.Connect(bot.host) if err != nil { return err }