Skip to main content
Corvus Connection

Twitch: Ensure Reward

Twitch
Action
twitch.reward.ensureCreates a channel-point reward only when none by that title exists, and returns the existing one otherwise. Idempotent, so it is safe on a recurring trigger: it cannot walk the channel into Twitch's 50-reward cap. Requires channel:manage:redemptions.Creates the reward if missing; binds ok / rewardId / error.
Engagement

Inputs

Name
Kind
Type
Flags
in
Exec
exec
multiplexed
title
Data
System.String
None
cost
Data
System.Int32
None
  • Name
    in
    Kind
    Exec
    Type
    exec
    Flags
    multiplexed
  • Name
    title
    Kind
    Data
    Type
    System.String
    Flags
    None
  • Name
    cost
    Kind
    Data
    Type
    System.Int32
    Flags
    None

Outputs

Name
Kind
Type
Flags
out
Exec
exec
None
ok
Data
System.Boolean
multiplexed
rewardId
Data
System.String
multiplexed
error
Data
System.String
multiplexed
  • Name
    out
    Kind
    Exec
    Type
    exec
    Flags
    None
  • Name
    ok
    Kind
    Data
    Type
    System.Boolean
    Flags
    multiplexed
  • Name
    rewardId
    Kind
    Data
    Type
    System.String
    Flags
    multiplexed
  • Name
    error
    Kind
    Data
    Type
    System.String
    Flags
    multiplexed

Parameters

Name
Type
Required
Default
Choices
prompt
System.String
no
""
None
  • Name
    prompt
    Type
    System.String
    Required
    no
    Default
    ""
    Choices
    None

Lowers to C#

var reward = await ctx.Twitch.Rewards.EnsureAsync(title, cost, prompt);