TwitchGetRewardCounter

Get the counter of a Twitch reward, by id

Signature

public TwitchRewardCounter TwitchGetRewardCounter(string rewardId, bool persisted = true)

Parameters

rewardId
string required

Id of your reward. Available by right-clicking your reward under Platforms > Twitch > Channel Point Rewards

persisted
bool
Default:
True

No description provided.

Return Type

Streamer.bot.Plugin.Interface.Model.TwitchRewardCounter

Example

using System;
public class CPHInline
{
    public bool Execute()
    {
        //Define reward id of reward you want counter
        string rewardId = "4fcc2d13-9bcf-4c18-9d91-821a15f4b6e5";

        //Get persisted reward counter info
        TwitchRewardCounter rewardCounter = CPH.TwitchGetRewardCounter(rewardId, true);         //Get counter
        int counter = rewardCounter.Count;
        //Set Argumnet for counter
        CPH.SetArgument("rewardCounter", counter);
        return true;
    }
}