Fix live-role assignment

- Fixes URL in streaming activity
- Fixes broken credentials in app-access-token

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-07-29 23:55:16 +02:00
parent 9026200947
commit 5524101e6c
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D
2 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ func (m modLiveRole) handlePresenceUpdate(d *discordgo.Session, p *discordgo.Pre
return 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") logger.WithError(err).WithField("url", activity.URL).Warning("Activity is not on Twitch")
exitFunc = m.removeLiveStreamerRole exitFunc = m.removeLiveStreamerRole
return return

View File

@ -129,8 +129,8 @@ func (t twitchAdapter) getAppAccessToken(ctx context.Context) (string, error) {
} }
params := make(url.Values) params := make(url.Values)
params.Set("client_id", "<your client ID>") params.Set("client_id", t.clientID)
params.Set("client_secret", "<your client secret>") params.Set("client_secret", t.clientSecret)
params.Set("grant_type", "client_credentials") params.Set("grant_type", "client_credentials")
u, _ := url.Parse("https://id.twitch.tv/oauth2/token") u, _ := url.Parse("https://id.twitch.tv/oauth2/token")