From cedab50ab740785ac999eed57ecb28d43bcac34b Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Mon, 1 Nov 2021 19:35:30 +0100 Subject: [PATCH] accidentally joined all channel --- pkg/db/listchannel.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/db/listchannel.go b/pkg/db/listchannel.go index efcac1a..b1ca8e1 100644 --- a/pkg/db/listchannel.go +++ b/pkg/db/listchannel.go @@ -16,8 +16,6 @@ func ListChannel(nb *bot.Bot) { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - // defer nb.MongoClient.Disconnect(ctx) - cur, currErr := collection.Find(ctx, bson.D{}) if currErr != nil { @@ -32,12 +30,8 @@ func ListChannel(nb *bot.Bot) { channelList := "" for _, ch := range channels { - nb.TwitchClient.Join(ch.Name) - // nb.TwitchClient.Say(ch.Name, "xd") channelList += ch.Name + " " } + 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)) }