add a channel counter and startup message

This commit is contained in:
lyx0 2021-10-28 23:58:58 +02:00
parent e5f737f602
commit 7b3386fb21

View file

@ -2,6 +2,7 @@ package db
import ( import (
"context" "context"
"fmt"
"time" "time"
"github.com/lyx0/nourybot/cmd/bot" "github.com/lyx0/nourybot/cmd/bot"
@ -31,10 +32,14 @@ func InitialJoin(nb *bot.Bot) {
panic(err) panic(err)
} }
channelCount := 0
for _, ch := range channels { for _, ch := range channels {
nb.TwitchClient.Join(ch.Name) nb.TwitchClient.Join(ch.Name)
// nb.TwitchClient.Say(ch.Name, "xd") // nb.TwitchClient.Say(ch.Name, "xd")
channelCount++
log.Infof("Joined: %s\n", ch.Name) log.Infof("Joined: %s\n", ch.Name)
} }
// It worked
nb.TwitchClient.Say("nourybot", fmt.Sprintf("Badabing Badaboom Pepepains Joined %v channel", channelCount))
} }