Documentation ¶
Index ¶
- type AutoMessage
- type AutoMessageHistory
- type AutoMessageUpdate
- type AutoMessageWithHistory
- type BanInfo
- type Banme
- type ChannelBanRecord
- type ChannelBans
- type ChannelInfo
- type ChannelInfoForTemplate
- type ChannelSelector
- type ChannelSongRequest
- type ChannelSongRequestSettings
- type ChannelUserSelector
- type ChannelUserWithID
- type ChannelUsers
- type ChannelWithID
- type ChatCommand
- type ChatMessage
- type ChatMessageLog
- type Config
- type DubTrack
- type FollowerCursor
- type FollowersList
- type GamesHistory
- type HTTPSession
- type HttpError
- type MessageStruct
- type OutgoingDebouncedMessage
- type OutgoingMessage
- type ResubInfo
- type Session
- type SongRequest
- type StreamStatus
- type StreamStatusGameHistory
- type SubAlert
- type SubAlertBody
- type SubAlertHistory
- type SubAlertWithHistory
- type SubTrain
- type Subday
- type SubdayList
- type SubdayNoWinners
- type SubdayRecord
- type SubdayWinnersHistory
- type SubscriptionInfo
- type TemplateAliasSelector
- type TemplateHistory
- type TemplateInfo
- type TemplateInfoBody
- type TemplateInfoWithHistory
- type TemplateIntegerRandomizer
- type TemplateSelector
- type TemplateStringRandomizer
- type TimerMessageHistory
- type TimerMessageInfo
- type TwitchDJ
- type UserBits
- type UserBitsHistory
- type UserBitsWithHistory
- type VkGroupInfo
- type YTContentDetails
- type YTItem
- type YTPageInfo
- type YTSnippet
- type YTStatistics
- type YoutubeVideo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoMessage ¶
type AutoMessage struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id"` ChannelID string `json:"channelID"` Message string `json:"message"` MessageLimit int `json:"messageLimit"` DurationLimit time.Duration `json:"durationLimit"` MessageThreshold int `json:"messageThreshold"` DurationThreshold time.Time `json:"durationThreshold"` Game string `json:"game"` }
type AutoMessageHistory ¶
type AutoMessageHistory struct { User string `valid:"required" json:"user"` UserID string `valid:"required" json:"userID"` Game string `json:"game"` Date time.Time `json:"date"` Message string `json:"message"` MessageLimit int `json:"messageLimit"` DurationLimit time.Duration `json:"durationLimit"` }
type AutoMessageUpdate ¶
type AutoMessageUpdate struct { ID string User string `valid:"required"` UserID string `valid:"required"` ChannelID string `valid:"required"` Game string `json:"game"` Message string `valid:"required" json:"message"` MessageLimit int `valid:"required" json:"messageLimit"` DurationLimit int `valid:"required" json:"durationlimit"` }
type AutoMessageWithHistory ¶
type AutoMessageWithHistory struct { AutoMessage `bson:",inline"` History []AutoMessageHistory `json:"history"` }
type BanInfo ¶
type BanInfo struct { User string `json:"user"` Duration int `json:"duration"` Reason string `json:"reason"` Type string `json:"type"` Date time.Time `json:"date"` }
BanInfo describes info about person being banned
type ChannelBanRecord ¶
type ChannelBans ¶
type ChannelBans struct { ChannelID string `json:"channelID"` Bans []ChannelBanRecord `json:"bans"` }
type ChannelInfo ¶
type ChannelInfo struct { ChannelID string `json:"channelId"` Channel string `json:"channel"` StreamStatus StreamStatus `json:"streamStatus"` Banme Banme TwitchDJ TwitchDJ `json:"twitchDJ"` DubTrack DubTrack `json:"dubTrack"` VkGroupInfo VkGroupInfo `json:"vkGroupInfo"` Mods []string `json:"mods"` OfflineCommands []string `json:"offlinecommands"` OnlineCommands []string `json:"onlinecommands"` SubTrain SubTrain `json:"subTrain"` SubdayIsActive bool `json:"subdayIsActive"` }
ChannelInfo describes all information about channel
func (ChannelInfo) GetCommands ¶
func (channelInfo ChannelInfo) GetCommands() string
GetCommands Helper Command for mustashe
func (ChannelInfo) GetGamesHistory ¶
func (chnanelInfo ChannelInfo) GetGamesHistory() string
func (ChannelInfo) GetIfUserIsMod ¶
func (channelInfo ChannelInfo) GetIfUserIsMod(userID *string) bool
GetIfUserIsMod checks if user exist in internal mod array
func (ChannelInfo) GetStreamDuration ¶
func (channelInfo ChannelInfo) GetStreamDuration() string
GetStreamDuration Helper Command for time for mustashe
type ChannelInfoForTemplate ¶
type ChannelSelector ¶
type ChannelSelector struct {
ChannelID string
}
ChannelSelector is query selector for specific channel
type ChannelSongRequest ¶
type ChannelSongRequest struct { ChannelID string Settings ChannelSongRequestSettings Requests []SongRequest }
type ChannelUserSelector ¶
ChannelSelector is query selector for specific channel
type ChannelUserWithID ¶
ChannelSelector is query selector for specific channel
type ChannelUsers ¶
type ChannelWithID ¶
type ChatCommand ¶
ChatCommand describes info about incoming chat command
type ChatMessage ¶
type ChatMessage struct { MessageStruct `bson:",inline"` Channel string ChannelID string User string UserID string IsMod bool IsSub bool IsPrime bool }
ChatMessage describes processed twitch message with essential information on it
func (ChatMessage) GetCommand ¶
func (chatMessage ChatMessage) GetCommand() (ChatCommand, bool)
GetCommand method checks if message starts from ! and returns body of command if it is command
type ChatMessageLog ¶
type Config ¶
type Config struct { OauthKey string `valid:"required"` BotUserName string `valid:"required"` Channels []string DbName string `valid:"required"` ClientID string `valid:"required"` ClientSecret string `valid:"required"` AppOauthURL string `valid:"required"` AppURL string `valid:"required"` Debug bool VkClientKey string YoutubeKey string }
Config defines nasfasf
type FollowerCursor ¶
type FollowersList ¶
type GamesHistory ¶
type GamesHistory []StreamStatusGameHistory
func (GamesHistory) Len ¶
func (history GamesHistory) Len() int
func (GamesHistory) Less ¶
func (history GamesHistory) Less(i, j int) bool
func (GamesHistory) ReturnHistory ¶
func (history GamesHistory) ReturnHistory() string
func (GamesHistory) Swap ¶
func (history GamesHistory) Swap(i, j int)
type HTTPSession ¶
type HTTPSession struct { Username string `valid:"required"` UserID string `valid:"required"` Key string `valid:"required"` AvatarURL string }
HTTPSession defines nasfasf
type HttpError ¶
type HttpError struct { Code int `json:"code"` Message interface{} `json:"message"` }
type MessageStruct ¶
type OutgoingDebouncedMessage ¶
type OutgoingDebouncedMessage struct { Message OutgoingMessage Command string RedirectTo string }
OutgoingDebouncedMessage defines message that is send to a server with debounce abilities
type OutgoingMessage ¶
OutgoingMessage defines message that is send to a server
type SongRequest ¶
type StreamStatus ¶
type StreamStatus struct { Online bool Game string `bson:",omitempty"` Title string `bson:",omitempty"` Start time.Time `bson:",omitempty"` LastOnlineTime time.Time `bson:",omitempty"` Viewers int `bson:",omitempty"` GamesHistory GamesHistory `bson:",omitempty"` }
StreamStatus Describes info about stream, when started, what game and title is, and if it is online
type StreamStatusGameHistory ¶
type SubAlert ¶
type SubAlert struct { ChannelID string `json:"channelID"` Enabled bool `json:"enabled"` SubAlertBody `bson:",inline"` }
SubAlertdescribes subscription alert
type SubAlertBody ¶
type SubAlertBody struct { FollowerMessage string `json:"followerMessage"` SubPrimeMessage string `json:"subPrimeMessage"` SubFiveMessage string `json:"subFiveMessage"` SubTenMessage string `json:"subTenMessage"` SubTwentyFiveMessage string `json:"subTwentyFiveMessage"` ResubPrimeMessage string `json:"resubPrimeMessage"` ResubFiveMessage string `json:"resubFiveMessage"` ResubTenMessage string `json:"resubTenMessage"` ResubTwentyFiveMessage string `json:"resubTwentyFiveMessage"` ResubPrimeSmile string `json:"resubPrimeSmile"` ResubFiveSmile string `json:"resubFiveSmile"` ResubTenSmile string `json:"resubTenSmile"` ResubTwentyFiveSmile string `json:"resubTwentyFiveSmile"` }
type SubAlertHistory ¶
type SubAlertHistory struct { User string `json:"user"` UserID string `json:"userID"` Date time.Time `json:"date"` SubAlert `bson:",inline"` }
SubAlertHistory describes all manipulations with subalerts
type SubAlertWithHistory ¶
type SubAlertWithHistory struct { SubAlert `bson:",inline"` History []SubAlertHistory `json:"history"` }
type SubTrain ¶
type SubTrain struct { Enabled bool `json:"enabled"` OnlyNewSubs bool `json:"onlyNewSubs"` ExpirationLimit int `json:"expirationLimit"` NotificationLimit int `json:"notificationLimit"` NotificationShown bool `json:"notificationShown"` ExpirationTime time.Time `json:"expirationTime"` NotificationTime time.Time `json:"notificationTime"` AppendTemplate string `json:"appendTemplate"` TimeoutTemplate string `json:"timeoutTemplate"` NotificationTemplate string `json:"notificationTemplate"` CurrentStreak int `json:"сurrentStreak"` Users []string `json:"users"` }
type Subday ¶
type Subday struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id"` ChannelID string `json:"channelID"` IsActive bool `json:"isActive"` SubsOnly bool `json:"subsOnly"` Name string `json:"name"` Date time.Time `json:"date"` Votes []SubdayRecord `json:"votes"` Winners []SubdayRecord `json:"winners"` WinnersHistory []SubdayWinnersHistory `json:"winnersHistory"` }
type SubdayList ¶
type SubdayNoWinners ¶
type SubdayRecord ¶
type SubdayWinnersHistory ¶
type SubdayWinnersHistory struct { Date time.Time `json:"date"` Winners []SubdayRecord `json:"winners"` }
type SubscriptionInfo ¶
type SubscriptionInfo struct { ID bson.ObjectId `bson:"_id,omitempty" json:"id"` Count int `json:"count"` IsPrime bool `json:"isPrime"` User string `json:"user"` UserID string `json:"userID"` ChannelID string `json:"channelID"` Date time.Time `json:"date"` SubPlan string `json:"subPlan"` }
SubscriptionInfo shows how many t imes user is subscribed to a channel
type TemplateAliasSelector ¶
TemplateAliasSelector is query selector for specific channel and command aliases
type TemplateHistory ¶
type TemplateHistory struct { TemplateInfoBody `bson:",inline"` User string `json:"user"` UserID string `json:"userID"` Date time.Time `json:"date"` }
TemplateHistory describes history of chat command
type TemplateInfo ¶
type TemplateInfo struct { ChannelID string `json:"channelID"` CommandName string `json:"commandName"` TemplateInfoBody `bson:",inline"` }
TemplateInfo describes info about chat template WITHOUT history
type TemplateInfoBody ¶
type TemplateInfoBody struct { ShowOnline bool `json:"showOnline"` ShowOffline bool `json:"showOffline"` PreventDebounce bool `json:"preventDebounce"` PreventRedirect bool `json:"preventRedirect"` OnlyPrivate bool `json:"onlyPrivate"` AliasTo string `json:"aliasTo"` Template string `json:"template"` IntegerRandomizer TemplateIntegerRandomizer `json:"integerRandomizer"` StringRandomizer TemplateStringRandomizer `json:"stringRandomizer"` }
type TemplateInfoWithHistory ¶
type TemplateInfoWithHistory struct { TemplateInfo `bson:",inline"` History []TemplateHistory `json:"history"` }
type TemplateSelector ¶
TemplateSelector is query selector for specific channel and command without aliases
type TimerMessageHistory ¶
type TimerMessageHistory struct { TimerMessageInfo `bson:",inline"` User string Date time.Time }
TimerMessageHistory is history-item for TimerMessageInfo
type TimerMessageInfo ¶
type TimerMessageInfo struct { ID string Channel string Period int MessageThreshhold int Body string LastRun time.Time }
TimerMessageInfo describes moobot-like automatic messages to chat
type TwitchDJ ¶
type TwitchDJ struct { ID string `json:"id"` Playing bool `json:"playing"` Track string `json:"track"` NotifyOnChange bool `json:"notifyOnChange"` }
TwitchDJ describes information about twitchDJ service
type UserBitsHistory ¶
type UserBitsWithHistory ¶
type UserBitsWithHistory struct { UserBits `bson:",inline"` History []UserBitsHistory `json:"history"` }
type VkGroupInfo ¶
type YTContentDetails ¶
type YTContentDetails struct {
Duration string `json:"duration"`
}
func (YTContentDetails) GetDuration ¶
func (ytContentDetails YTContentDetails) GetDuration() (*time.Duration, error)
type YTItem ¶
type YTItem struct { Snippet YTSnippet `json:"snippet"` ContentDetails YTContentDetails `json:"contentDetails"` Statistics YTStatistics `json:"statistics"` }
type YTPageInfo ¶
type YTPageInfo struct {
TotalResults int `json:"totalResults"`
}
type YTStatistics ¶
type YTStatistics struct {
ViewCount string `json:"viewCount"`
}
func (YTStatistics) GetViewCount ¶
func (ytStatistics YTStatistics) GetViewCount() int64
type YoutubeVideo ¶
type YoutubeVideo struct { PageInfo YTPageInfo `json:"pageInfo"` Items []YTItem `json:"items"` }
Source Files ¶
- autoMessage.go
- autoMessageHistory.go
- autoMessageUpdate.go
- autoMessageWithHistory.go
- banInfo.go
- banme.go
- channelBans.go
- channelInfo.go
- channelSelector.go
- channelUserSelector.go
- channelUserWithID.go
- channelUsers.go
- channelWithID.go
- chatCommand.go
- chatMessage.go
- chatMessageLog.go
- config.go
- dubTrack.go
- followerCursor.go
- followersList.go
- httpError.go
- httpSession.go
- messageStruct.go
- outgoingDebouncedMessage.go
- outgoingMessage.go
- resubInfo.go
- session.go
- songRequest.go
- streamStatus.go
- subAlert.go
- subAlertHistory.go
- subAlertWithHistory.go
- subTrain.go
- subday.go
- subscriptionInfo.go
- templateAliasSelector.go
- templateHistory.go
- templateInfo.go
- templateInfoWithHistory.go
- templateSelector.go
- timerMessageHistory.go
- timerMessageInfo.go
- twitchDJ.go
- userBits.go
- vkGroupInfo.go
- youtubeVideo.go