discord

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	OpenChannels   []string `json:"open,omitempty"`
	StatusChannels []string `json:"status,omitempty"`
}

type Player

type Player interface {
	Play(ctx context.Context, query, userID, guildID, channelID string) (*pkg.Song, error)
	Skip(ctx context.Context)
	SetLoop(ctx context.Context, b bool)
	LoopStatus() bool
	NowPlaying() *pkg.Song
	SongStatus() pkg.SessionStats
	Disconnect(ctx context.Context) //
	Random(ctx context.Context, n int) ([]*pkg.Song, error)
	SetRadio(ctx context.Context, b bool, guildID, channelID string) error
	RadioStatus() bool
}

type Service

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

func NewCog

func NewCog(player Player, prefix string, config APIConfig) *Service

func (*Service) RegisterCommands

func (s *Service) RegisterCommands(ctx context.Context, session *discordgo.Session, debug bool, logger *zap.Logger)

Jump to

Keyboard shortcuts

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