diff --git a/automessage.go b/automessage.go
index c98cb5d..583c171 100644
--- a/automessage.go
+++ b/automessage.go
@@ -25,6 +25,7 @@ type autoMessage struct {
Message string `json:"message,omitempty" yaml:"message,omitempty"`
UseAction bool `json:"use_action,omitempty" yaml:"use_action,omitempty"`
+ Disable bool `json:"disable,omitempty" yaml:"disable,omitempty"`
DisableOnTemplate *string `json:"disable_on_template,omitempty" yaml:"disable_on_template,omitempty"`
Cron string `json:"cron,omitempty" yaml:"cron,omitempty"`
@@ -83,6 +84,13 @@ func (a *autoMessage) CanSend() bool {
}
}
+ if a.Disable {
+ log.Trace("Auto-Message disabled by flag")
+ // Reset the timer for this execution not to spam every second
+ a.lastMessageSent = time.Now()
+ return false
+ }
+
if !a.allowExecuteDisableOnTemplate() {
log.Trace("Auto-Message disabled by template")
// Reset the timer for this execution not to spam every second
diff --git a/src/automessages.vue b/src/automessages.vue
index 1e0c3dc..132e061 100644
--- a/src/automessages.vue
+++ b/src/automessages.vue
@@ -45,6 +45,29 @@
{{ data.value }}
+
+ {{ data.value }}
+
+ Disabled
+
+
+ Disable on Template
+
+
+ Only during Stream
+
+
+
+
+
+ Disable Auto-Message entirely
+
+
+