public ChatTrigger(string pattern, Webhook webhook, string message, bool enabled) { try { Pattern = new Regex(MessageUtil.SubstituteVariables(pattern), RegexOptions.Compiled); Webhook = webhook; MessageFormat = message; Enabled = enabled; } catch (Exception ex) { Util.WriteToChat("Error creating new Chat Trigger: " + ex.Message); Util.LogError(ex); } // TODO Color = -1; }
public string ToJSONStringValue() { return(MessageUtil.SubstituteVariables(MessageFormatString, EventMessage, false).Replace("\"", "\\\"")); }
public string ToQueryStringValue() { return(MessageUtil.SubstituteVariables(MessageFormatString, EventMessage, true)); }