From 5524101e6cd5ba6473cfaf438304c95697e327d5 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 29 Jul 2021 23:55:16 +0200 Subject: [PATCH] Fix live-role assignment - Fixes URL in streaming activity - Fixes broken credentials in app-access-token Signed-off-by: Knut Ahlers --- mod_liveRole.go | 2 +- twitch.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mod_liveRole.go b/mod_liveRole.go index cef27cb..e632cfb 100644 --- a/mod_liveRole.go +++ b/mod_liveRole.go @@ -111,7 +111,7 @@ func (m modLiveRole) handlePresenceUpdate(d *discordgo.Session, p *discordgo.Pre return } - if u.Host != "twitch.tv" { + if u.Host != "www.twitch.tv" { logger.WithError(err).WithField("url", activity.URL).Warning("Activity is not on Twitch") exitFunc = m.removeLiveStreamerRole return diff --git a/twitch.go b/twitch.go index 624e31b..50b8112 100644 --- a/twitch.go +++ b/twitch.go @@ -129,8 +129,8 @@ func (t twitchAdapter) getAppAccessToken(ctx context.Context) (string, error) { } params := make(url.Values) - params.Set("client_id", "") - params.Set("client_secret", "") + params.Set("client_id", t.clientID) + params.Set("client_secret", t.clientSecret) params.Set("grant_type", "client_credentials") u, _ := url.Parse("https://id.twitch.tv/oauth2/token")