public TwitchRewardCounter TwitchGetRewardUserCounter(string userLogin, string rewardId, bool persisted = true)
No description provided.
Id of your reward. Available by right-clicking your reward under Platforms > Twitch > Channel Point Rewards
True
No description provided.
Streamer.bot.Plugin.Interface.Model.TwitchRewardCounter
using System;
public class CPHInline
{
public bool Execute()
{
//Define reward id of reward you want counter
string rewardId = "4fcc2d13-9bcf-4c18-9d91-821a15f4b6e5";
//Get user login
CPH.TryGetArg("userName",out string userLogin);
//Get persisted reward counter info of for specific user
TwitchRewardCounter rewardCounter = CPH.TwitchGetRewardUserCounter(userLogin, rewardId, true); //Get counter
int counter = rewardCounter.Count;
//Set Argumnet for counter
CPH.SetArgument("rewardUserCounter", counter);
return true;
}
}