Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public string ToJSONStringValue()
 {
     return(MessageUtil.SubstituteVariables(MessageFormatString, EventMessage, false).Replace("\"", "\\\""));
 }
Esempio n. 3
0
 public string ToQueryStringValue()
 {
     return(MessageUtil.SubstituteVariables(MessageFormatString, EventMessage, true));
 }