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