//Process the given command and return it public static Comment Process(Comment c) { if (CheckBlacklist(c)) { return(new Comment(c.user, "")); //Return empty comment and do nothing } if (!CommandIdentifier.CheckCommand(c)) //before everything else is changed, check if it's a command { c.user = RemoveNumeric(c.user); //Remove numbers from name for faster reading? Hm... could be bad c = SpamProtection(c); //Check with the Spam protection before giving it back return(c); } else //If it is a command, remove the comment to not read it out in the TTS { c.comment = ""; return(c); } }
//Channel Point redemption, Check if redemption is connected to code private void Pubsub_OnRewardRedeemed(object sender, OnRewardRedeemedArgs e) { CommandIdentifier.CheckCommand(e); //RewardRedeemedDebug(e); //Log everything of a channel point redemption }
void PubSubMessageRecived(object sender, MessageReceivedEventArgs e) { dynamic redemption = Newtonsoft.Json.Linq.JObject.Parse(e.Message); CommandIdentifier.CheckCommand(redemption); }