common

package
v0.0.0-...-600e11d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BuildTime is the time when the binary was built
	// filled in with ./build.sh (ldflags)
	BuildTime string

	BuildRelease string

	BuildHash string

	BuildBranch string
)

Functions

func IsDuplicateKey

func IsDuplicateKey(err error) bool

func Version

func Version() string

Types

type DBUser

type DBUser struct {
	// ID in the database
	ID int

	// Name of the user, i.e. snusbot
	Name string

	// Type of the user
	Type string

	TwitchCredentials TwitchClientCredentials
}

DBUser xD

type Emote

type Emote struct {
	Name string `json:"name"`
	ID   string `json:"id"`
	// Possible types: bttv, twitch, ffz
	Type string `json:"type"`

	// Size in pixels
	SizeX int `json:"size_x"`
	SizeY int `json:"size_y"`

	IsGif bool `json:"is_gif"`
	Count int  `json:"count"`

	MaxScale int `json:"max_scale"`
}

Emote xD

func (Emote) GetCount

func (e Emote) GetCount() int

func (Emote) GetID

func (e Emote) GetID() string

func (Emote) GetName

func (e Emote) GetName() string

func (Emote) GetType

func (e Emote) GetType() string

type EmoteByName

type EmoteByName []Emote

EmoteByName implements sort.Interface by emote name

func (EmoteByName) Len

func (a EmoteByName) Len() int

Len implements sort.Interface

func (EmoteByName) Less

func (a EmoteByName) Less(i, j int) bool

Less implements sort.Interface

func (EmoteByName) Swap

func (a EmoteByName) Swap(i, j int)

Swap implements sort.Interface

type ExtensionEmotes

type ExtensionEmotes struct {
	// Global BTTV Emotes
	Bttv           map[string]Emote
	BttvLastUpdate time.Time

	// Global FrankerFaceZ Emotes
	FrankerFaceZ           map[string]Emote
	FrankerFaceZLastUpdate time.Time
}

ExtensionEmotes is an object which contains emotes that are shared between all channels

type GlobalUser

type GlobalUser struct {
	LastActive time.Time
	Channel    string
	Level      int
}

GlobalUser will only be used by boss to check if user is admin and to decide what channel to send the message to if its a whisper

type MsgType

type MsgType uint32

MsgType specifies the message's type, for example PRIVMSG or WHISPER

const (
	MsgPrivmsg MsgType = iota + 1
	MsgWhisper
	MsgSub
	MsgThrowAway
	MsgUnknown
	MsgUserNotice
	MsgReSub
	MsgNotice
	MsgRoomState
	MsgSubsOn
	MsgSubsOff
	MsgSlowOn
	MsgSlowOff
	MsgR9kOn
	MsgR9kOff
	MsgHostOn
	MsgHostOff
	MsgTimeoutSuccess
	MsgReconnect
)

Various message types which describe what sort of message they are

type TwitchClientCredentials

type TwitchClientCredentials struct {
	AccessToken string

	RefreshToken string
}

TwitchClientCredentials xD

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL