mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-20 11:51:17 +00:00
[core] Allow case insensitive category matches
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
eee9e6594b
commit
63685ff5f2
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
@ -75,7 +76,7 @@ func (c *Client) ModifyChannelInformation(ctx context.Context, broadcasterName s
|
|||
default:
|
||||
// Multiple matches: Search for exact one
|
||||
for _, c := range categories {
|
||||
if c.Name == *game {
|
||||
if strings.EqualFold(c.Name, *game) {
|
||||
gid := c.ID
|
||||
data.GameID = &gid
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue