player

package
v0.0.0-...-5190cbe Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPlaying StatusSignal = iota
	StatusResuming
	StatusAdded
	StatusPaused  // reserved, not used
	StatusResting // reserved, not used
	StatusError   // reserved, not used

	ActionStop        ActionSignal = iota // stop the player
	ActionSkip                            // skip the current song
	ActionSwap                            // channel swap
	ActionPauseResume                     // pause or resume
	ActionPlay                            // play
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionSignal

type ActionSignal int32

type Player

type Player struct {
	ChannelID     string
	GuildID       string
	Session       *discordgo.Session
	Storage       *storage.Storage
	Song          *songpkg.Song
	Queue         []*songpkg.Song
	StatusSignals chan StatusSignal
	ActionSignals chan ActionSignal
}

func New

func New(ds *discordgo.Session, s *storage.Storage) *Player

func (*Player) Play

func (p *Player) Play() error

type StatusSignal

type StatusSignal int32

func (StatusSignal) String

func (status StatusSignal) String() string

func (StatusSignal) StringEmoji

func (status StatusSignal) StringEmoji() string

Jump to

Keyboard shortcuts

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