mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-11-09 23:50:04 +00:00
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:
parent
9026200947
commit
5524101e6c
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
|
@ -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")
|
||||||
|
|
Loading…
Reference in a new issue