accidentally joined all channel

This commit is contained in:
lyx0 2021-11-01 19:35:30 +01:00
parent 7531a67b18
commit cedab50ab7

View file

@ -16,8 +16,6 @@ func ListChannel(nb *bot.Bot) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel() defer cancel()
// defer nb.MongoClient.Disconnect(ctx)
cur, currErr := collection.Find(ctx, bson.D{}) cur, currErr := collection.Find(ctx, bson.D{})
if currErr != nil { if currErr != nil {
@ -32,12 +30,8 @@ func ListChannel(nb *bot.Bot) {
channelList := "" channelList := ""
for _, ch := range channels { for _, ch := range channels {
nb.TwitchClient.Join(ch.Name)
// nb.TwitchClient.Say(ch.Name, "xd")
channelList += ch.Name + " " channelList += ch.Name + " "
} }
nb.TwitchClient.Whisper("nouryqt", channelList) nb.TwitchClient.Whisper("nouryqt", channelList)
// It worked
// nb.Send("nourybot", fmt.Sprintf("Badabing Badaboom Pepepains Joined %v channel", channelCount))
// nb.Send("nouryqt", fmt.Sprintf("Badabing Badaboom Pepepains Joined %v channel", channelCount))
} }