From 7b3386fb2177b52e7dc26bddd124c6461e9c8fe4 Mon Sep 17 00:00:00 2001 From: lyx0 Date: Thu, 28 Oct 2021 23:58:58 +0200 Subject: [PATCH] add a channel counter and startup message --- pkg/db/initialjoin.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/db/initialjoin.go b/pkg/db/initialjoin.go index 1678182..d4efab6 100644 --- a/pkg/db/initialjoin.go +++ b/pkg/db/initialjoin.go @@ -2,6 +2,7 @@ package db import ( "context" + "fmt" "time" "github.com/lyx0/nourybot/cmd/bot" @@ -31,10 +32,14 @@ func InitialJoin(nb *bot.Bot) { panic(err) } + channelCount := 0 + for _, ch := range channels { nb.TwitchClient.Join(ch.Name) // nb.TwitchClient.Say(ch.Name, "xd") + channelCount++ log.Infof("Joined: %s\n", ch.Name) } - + // It worked + nb.TwitchClient.Say("nourybot", fmt.Sprintf("Badabing Badaboom Pepepains Joined %v channel", channelCount)) }