Get Reward Info
Get the info from a reward.

Get Reward Info Dialog
Get Reward Info
Get the info from a reward.
Parameters
Reward
Choose the reward where you want to get the info from.
Variables
The following variables will be populated after executing this sub-action:
Name | Description |
---|---|
rewardId | String identifier for this reward |
rewardTitle | The title of the reward |
rewardBackgroundColor | The background color of the reward |
rewardEnabled | If the reward is enabled |
rewardPrompt | The verbiage shown on the channel point description |
rewardSkipReuqestQueue | If there is a skip request in the queue |
rewardCost | The cost of the reward |
C# Usage
Returns a list of Twitch Reward
public List<TwitchReward> TwitchGetRewards()
No parameters
using System;
using System.Collections.Generic; //needed due to List usage
public class CPHInline
{
public bool Execute()
{
//Get list of rewards
List<TwitchReward> rewardList = CPH.TwitchGetRewards();
//Example to go through list and write them to logfile
foreach(TwitchReward reward in rewardList)
{
//Get id of current reward
string id = reward.Id;
//Get title of reward
string title = reward.Title;
//Get cost of current reward
int cost = reward.Cost;
//Write to log
CPH.LogInfo($"RewardId:{id}, Reward Title: {title}, Cost: {cost}");
}
return true;
}
}