diff --git a/internal/actors/modchannel/actor.go b/internal/actors/modchannel/actor.go index b784cf2..b9290f5 100644 --- a/internal/actors/modchannel/actor.go +++ b/internal/actors/modchannel/actor.go @@ -41,7 +41,7 @@ func Register(args plugins.RegistrationArguments) error { }, { Default: "", - Description: "Category / Game to set", + Description: "Category / Game to set (use `@1234` format to pass an explicit ID)", Key: "game", Name: "Game", Optional: true, diff --git a/pkg/twitch/twitch.go b/pkg/twitch/twitch.go index 4101424..7ce7ecd 100644 --- a/pkg/twitch/twitch.go +++ b/pkg/twitch/twitch.go @@ -470,7 +470,16 @@ func (c *Client) ModifyChannelInformation(ctx context.Context, broadcasterName s Title: title, } - if game != nil { + switch { + case game == nil: + // We don't set the GameID + + case (*game)[0] == '@': + // We got an ID and don't need to resolve + gameID := (*game)[1:] + data.GameID = &gameID + + default: categories, err := c.SearchCategories(ctx, *game) if err != nil { return errors.Wrap(err, "searching for game")