From a33b72f4ff8e576d59120e7cc47aa850443a2968 Mon Sep 17 00:00:00 2001 From: lyx0 <66651385+lyx0@users.noreply.github.com> Date: Fri, 29 Oct 2021 15:32:13 +0200 Subject: [PATCH] actually join and part from channel --- pkg/db/addchannel.go | 2 +- pkg/db/partchannel.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/db/addchannel.go b/pkg/db/addchannel.go index 332c42c..7c2a4e7 100644 --- a/pkg/db/addchannel.go +++ b/pkg/db/addchannel.go @@ -26,6 +26,6 @@ func AddChannel(target, channelName string, nb *bot.Bot) { log.Error(insertErr) return } - + nb.TwitchClient.Join(channelName) nb.Send(target, fmt.Sprintf("Joined %s", channelName)) } diff --git a/pkg/db/partchannel.go b/pkg/db/partchannel.go index ea020c6..f9c734c 100644 --- a/pkg/db/partchannel.go +++ b/pkg/db/partchannel.go @@ -30,6 +30,8 @@ func PartChannel(target, channelName string, nb *bot.Bot) { log.Error(insertErr) return } + + nb.TwitchClient.Depart(channelName) nb.Send(target, fmt.Sprintf("Parted %s", channelName)) // log.Info(res)