twitch

package
v0.0.0-...-daa8be9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Type = 1 << 1

Variables

View Source
var (
	ErrExpiredRefreshToken = errors.New("The user will need to reconnect the bot to twitch.")
	ErrRetry               = errors.New("Refresh the access token and try again.")
	ErrNoResults           = errors.New("Couldn't find what you were looking for.")
	ErrUserTokenRequired   = errors.New("This channel's broadcaster must connect their twitch account to the bot.")
)
View Source
var (
	ClientID     string
	ClientSecret string
)
View Source
var Frontend = &frontend{}

Functions

func NewState

func NewState() (string, error)

Types

type Author

type Author struct {
	User tirc.User
}

Author implements both the core.Author and core.Here interfaces since users and channels are the same thing on twitch.

func (Author) Admin

func (a Author) Admin() bool

func (Author) BotAdmin

func (a Author) BotAdmin() bool

func (Author) DisplayName

func (a Author) DisplayName() string

func (Author) ID

func (a Author) ID() string

func (Author) Mention

func (a Author) Mention() string

func (Author) Mod

func (a Author) Mod() bool

func (Author) Name

func (a Author) Name() string

func (Author) Scope

func (a Author) Scope() (int64, error)

func (Author) ScopeExact

func (a Author) ScopeExact() (int64, error)

func (Author) ScopeLogical

func (a Author) ScopeLogical() (int64, error)

func (Author) Subscriber

func (a Author) Subscriber() bool

type Helix

type Helix struct {
	// contains filtered or unexported fields
}

func (*Helix) EditChannelInfo

func (h *Helix) EditChannelInfo(broadcasterID, title, gameID string) (error, error)

func (*Helix) GetBannedUser

func (h *Helix) GetBannedUser(broadcasterID, userID string) (helix.Ban, error)

func (*Helix) GetChannelInfo

func (h *Helix) GetChannelInfo(broadcasterID string) (helix.ChannelInformation, error)

func (*Helix) GetClip

func (h *Helix) GetClip(clipID string) (helix.Clip, error)

func (*Helix) GetFollower

func (h *Helix) GetFollower(broadcasterID, userID string) (helix.UserFollow, error)

func (*Helix) GetGameName

func (h *Helix) GetGameName(channel_id string) (string, error)

func (*Helix) GetStream

func (h *Helix) GetStream(broadcasterID string) (helix.Stream, error)

func (*Helix) GetTitle

func (h *Helix) GetTitle(channel_id string) (string, error)

func (*Helix) GetUser

func (h *Helix) GetUser(userID string) (helix.User, error)

func (*Helix) GetUserID

func (h *Helix) GetUserID(username string) (string, error)

func (*Helix) SearchGame

func (h *Helix) SearchGame(gameName string) (helix.Game, error)

func (*Helix) SetGame

func (h *Helix) SetGame(channelID, gameName string) (string, error, error)

func (*Helix) SetTitle

func (h *Helix) SetTitle(channelID, title string) (error, error)

type Here

type Here struct {
	RoomID   string
	RoomName string
}

func (Here) ID

func (h Here) ID() string

func (Here) Name

func (h Here) Name() string

func (Here) Scope

func (h Here) Scope() (int64, error)

func (Here) ScopeExact

func (h Here) ScopeExact() (int64, error)

func (Here) ScopeLogical

func (h Here) ScopeLogical() (int64, error)

type Twitch

type Twitch struct {
	// contains filtered or unexported fields
}

func (*Twitch) AuthorConnected

func (t *Twitch) AuthorConnected() (bool, error)

func (*Twitch) AuthorDeafened

func (t *Twitch) AuthorDeafened() (bool, error)

func (*Twitch) Channels

func (t *Twitch) Channels() int

func (*Twitch) Enabled

func (t *Twitch) Enabled() bool

func (*Twitch) FrameRate

func (t *Twitch) FrameRate() int

func (*Twitch) Helix

func (t *Twitch) Helix() (*Helix, error)

func (*Twitch) Join

func (t *Twitch) Join() error

func (*Twitch) Parse

func (t *Twitch) Parse() (*core.Message, error)

func (*Twitch) Person

func (t *Twitch) Person(id string) (int64, error)

func (*Twitch) PersonID

func (t *Twitch) PersonID(s, _ string) (string, error)

Place and Person refer to the same thing on twitch

func (*Twitch) Ping

func (t *Twitch) Ping(msg any, _ error) (*core.Message, error)

func (*Twitch) PlaceExact

func (t *Twitch) PlaceExact(id string) (int64, error)

func (*Twitch) PlaceID

func (t *Twitch) PlaceID(s string) (string, error)

Place and Person refer to the same thing on twitch

func (*Twitch) PlaceLogical

func (t *Twitch) PlaceLogical(id string) (int64, error)

func (*Twitch) Say

func (t *Twitch) Say(io.Reader, *core.AudioState) error

func (*Twitch) Send

func (t *Twitch) Send(msg any, _ error) (*core.Message, error)

func (*Twitch) Usage

func (t *Twitch) Usage(usage string) any

func (*Twitch) Write

func (t *Twitch) Write(msg any, usrErr error) (*core.Message, error)

Jump to

Keyboard shortcuts

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