mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 16:50:01 +00:00
Fix: Use of unexported method
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
76924e10c1
commit
d434e5b623
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
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 {
|
if err != nil && len(v) > 0 {
|
||||||
return v[0], nil
|
return v[0], nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,7 +101,7 @@ func (t twitchClient) getIDForUsername(username string) (string, error) {
|
||||||
return payload.Data[0].ID, nil
|
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)
|
ctx, cancel := context.WithTimeout(context.Background(), twitchRequestTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue