--- a/main.go Wed Mar 20 14:46:13 2019 -0700
+++ b/main.go Wed Mar 20 15:03:18 2019 -0700
@@ -112,7 +112,7 @@
channel := getguild2channel(evt.GuildID)
- err := processPresenceUpdate(sess, channel, strings.TrimLeft(pURL.Path, "/"))
+ err := processPresenceUpdate(sess, channel, strings.TrimLeft(pURL.Path, "/"), evt.Game.URL) @@ -157,7 +157,7 @@
if channel != m.ChannelID {
- err := processPresenceUpdate(s, channel, commandItems[1])
+ err := processPresenceUpdate(s, channel, commandItems[1], "https://twitch.com/"+commandItems[1]) @@ -179,7 +179,7 @@
-func processPresenceUpdate(s *discordgo.Session, channelid, twitchName string) error {
+func processPresenceUpdate(s *discordgo.Session, channelid, twitchName, url string) error { resp, err := TwitchClient.GetUsers(&helix.UsersParams{
Logins: []string{twitchName},
@@ -212,7 +212,7 @@
URL: user.OfflineImageURL,
Author: &discordgo.MessageEmbedAuthor{
- URL: "https://twitch.com/" + user.Login,
Name: user.DisplayName + " is now live",
Thumbnail: &discordgo.MessageEmbedThumbnail{