twitch

package
v0.0.0-...-bb841d2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CallbackEventSub = "/twitch/eventsub"
)
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 (
	Admins       []string
	ClientID     string
	ClientSecret string
)
View Source
var Frontend = &frontend{}

Functions

func AddEventSubSubscriptionID

func AddEventSubSubscriptionID(tx *sql.Tx, id string) error

func DeleteEventSubSubscriptionID

func DeleteEventSubSubscriptionID(tx *sql.Tx, id string) error

func NewState

func NewState() (string, error)

Types

type Author

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

Author implements both the core.Personifier interface.

func (Author) Admin

func (a Author) Admin() (bool, error)

func (Author) BotAdmin

func (a Author) BotAdmin() (bool, error)

func (Author) DisplayName

func (a Author) DisplayName() (string, error)

func (Author) ID

func (a Author) ID() (string, error)

func (Author) Mention

func (a Author) Mention() (string, error)

func (Author) Moderator

func (a Author) Moderator() (bool, error)

func (Author) Name

func (a Author) Name() (string, error)

func (Author) Scope

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

func (Author) Subscriber

func (a Author) Subscriber() (bool, error)

type Helix

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

func NewHelix

func NewHelix(userID string) (*Helix, error)

func (*Helix) CreateSubscription

func (h *Helix) CreateSubscription(broadcasterID, t string) (string, error)

func (*Helix) DeleteSubscription

func (h *Helix) DeleteSubscription(subID string) error

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(channelId string) (string, error)

func (*Helix) GetStream

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

func (*Helix) GetTitle

func (h *Helix) GetTitle(channelId 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) IsMod

func (h *Helix) IsMod(broadcasterID, userID string) (bool, error)

func (*Helix) IsSub

func (h *Helix) IsSub(broadcasterID, userID string) (bool, error)

func (*Helix) ListSubscriptions

func (h *Helix) ListSubscriptions() ([]helix.EventSubSubscription, error)

func (*Helix) RedeemsList

func (h *Helix) RedeemsList(broadcasterID string) ([]helix.ChannelCustomReward, 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
	Author   core.Personifier
	// contains filtered or unexported fields
}

func (Here) IDExact

func (h Here) IDExact() string

func (Here) IDLogical

func (h Here) IDLogical() 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 Speaker

type Speaker struct{}

func (Speaker) AuthorConnected

func (s Speaker) AuthorConnected() (bool, error)

func (Speaker) AuthorDeafened

func (s Speaker) AuthorDeafened() (bool, error)

func (Speaker) Channels

func (s Speaker) Channels() int

func (Speaker) Enabled

func (s Speaker) Enabled() bool

func (Speaker) FrameRate

func (s Speaker) FrameRate() int

func (Speaker) Join

func (s Speaker) Join() error

func (Speaker) Leave

func (s Speaker) Leave() error

func (Speaker) Say

func (s Speaker) Say(io.Reader, <-chan core.AudioState) error

type Twitch

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

func (*Twitch) Helix

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

func (*Twitch) Natural

func (t *Twitch) Natural(msg any, _ core.Urr) (*core.Message, 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, _ core.Urr) (*core.Message, error)

func (*Twitch) PlaceID

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

Place and Person refer to the same thing on twitch

func (*Twitch) QuoteCommand

func (t *Twitch) QuoteCommand(cmd string) string

func (*Twitch) Send

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

func (*Twitch) Write

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

Jump to

Keyboard shortcuts

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