diff --git a/msgformatter.go b/msgformatter.go index d0cd9c7..3a590f4 100644 --- a/msgformatter.go +++ b/msgformatter.go @@ -56,7 +56,7 @@ func formatMessage(tplString string, m *irc.Message, r *rule, fields map[string] } messageFunctions["recentGame"] = func(username string, v ...string) (string, error) { - game, _, err := twitch.getRecentStreamInfo(strings.TrimLeft(username, "#")) + game, _, err := twitch.GetRecentStreamInfo(strings.TrimLeft(username, "#")) if err != nil && len(v) > 0 { return v[0], nil } diff --git a/twitch.go b/twitch.go index c426b68..ed15cdb 100644 --- a/twitch.go +++ b/twitch.go @@ -101,7 +101,7 @@ func (t twitchClient) getIDForUsername(username string) (string, error) { return payload.Data[0].ID, nil } -func (t twitchClient) getRecentStreamInfo(username string) (string, string, error) { +func (t twitchClient) GetRecentStreamInfo(username string) (string, string, error) { ctx, cancel := context.WithTimeout(context.Background(), twitchRequestTimeout) defer cancel()