strimertul/twitch/timers/config.go

28 lines
1014 B
Go

package timers
const ConfigKey = "twitch/timers/config"
type Config struct {
Timers map[string]ChatTimer `json:"timers" desc:"List of timers as a dictionary"`
}
type ChatTimer struct {
// Whether the timer is enabled
Enabled bool `json:"enabled" desc:"Enable the timer"`
// Timer name (must be unique)
Name string `json:"name" desc:"Timer name (must be unique)"`
// Minimum chat messages in the last 5 minutes for timer to trigger
MinimumChatActivity int `json:"minimum_chat_activity" desc:"Minimum chat messages in the last 5 minutes for timer to trigger"`
// Minimum amount of time (in seconds) that needs to pass before it triggers again
MinimumDelay int `json:"minimum_delay" desc:"Minimum amount of time (in seconds) that needs to pass before it triggers again"`
// Messages to write (randomly chosen)
Messages []string `json:"messages" desc:"Messages to write (randomly chosen)"`
// Announce the message to the chat
Announce bool `json:"announce" desc:"If true, send as announcement"`
}