strimertul/twitch/chat/data.go

46 lines
1.4 KiB
Go

package chat
const (
ActivityKey = "twitch/chat/activity"
CustomCommandsKey = "twitch/chat/custom-commands"
WriteMessageRPC = "twitch/chat/@send-message"
)
type ResponseType string
const (
ResponseTypeDefault ResponseType = ""
ResponseTypeChat ResponseType = "chat"
ResponseTypeWhisper ResponseType = "whisper"
ResponseTypeReply ResponseType = "reply"
ResponseTypeAnnounce ResponseType = "announce"
)
type AccessLevelType string
const (
ALTEveryone AccessLevelType = "everyone"
ALTSubscribers AccessLevelType = "subscriber"
ALTVIP AccessLevelType = "vip"
ALTModerators AccessLevelType = "moderators"
ALTStreamer AccessLevelType = "streamer"
)
// CustomCommand is a definition of a custom command of the chatbot
type CustomCommand struct {
// Command description
Description string `json:"description" desc:"Command description"`
// Minimum access level needed to use the command
AccessLevel AccessLevelType `json:"access_level" desc:"Minimum access level needed to use the command"`
// Response template (in Go templating format)
Response string `json:"response" desc:"Response template (in Go templating format)"`
// Is the command enabled?
Enabled bool `json:"enabled" desc:"Is the command enabled?"`
// How to respond to the user
ResponseType ResponseType `json:"response_type" desc:"How to respond to the user"`
}