Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBClearLoop ¶
func DBClearLoop(c chan bool)
func DeleteMessagesByAuthor ¶
func DeleteMessagesByAuthor(userID string)
Remove all the messages from the pool by author 'userID'
Types ¶
type Author ¶
type Author struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` Pronouns pronoun `json:"pronouns"` TimeFetched time.Time `json:"-"` }
func ProcessAuthor ¶
func ProcessAuthor(raw *twitch.User) *Author
Parse a raw twitch user into a local author. If the db contains the user & they has not expired, it will return the already made author.
type Emote ¶
type Emote struct { URL string `json:"url"` // [][start, end] Positions [][2]int `json:"positions"` }
func ProcessEmotes ¶
type Message ¶
type Message struct { ID string `json:"id"` Author *Author `json:"author"` Content string `json:"content"` Time time.Time `json:"time"` Emotes []*Emote `json:"emotes"` Bits int `json:"bits"` Action bool `json:"action"` Parent *Message `json:"reply"` }
func FetchMessage ¶
Get a message by ID (from the message pool)
func FetchMessages ¶
func FetchMessages() []*Message
Get all the available messages from the considered pool
func ProcessMessage ¶
func ProcessMessage(raw *twitch.PrivateMessage) *Message
Parse a raw twitch message into a readable local message and add it to the pool If the message has already been added to the pool, no more processing will be done to it.
Click to show internal directories.
Click to hide internal directories.