bot

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

starts the bot

Types

type CmdHandler

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

type MusicBot

type MusicBot struct {
	// Disgo client
	Client bot.Client

	// Lavalink client
	Lavalink disgolink.Client

	// Music queue manager
	Queues *QueueManager
	// contains filtered or unexported fields
}

func NewMusicBot

func NewMusicBot(token string) (*MusicBot, error)

func (*MusicBot) Close

func (b *MusicBot) Close(ctx context.Context)

a clean shutdown of the bot

func (*MusicBot) Start

func (b *MusicBot) Start(ctx context.Context) error

handle starting the bot

func (*MusicBot) Sync

func (b *MusicBot) Sync(ctx context.Context, guids []snowflake.ID) error

syncs slash commands to discord

type Queue

type Queue struct {
	Tracks []lavalink.Track
	Type   QueueType
}

func (*Queue) Add

func (q *Queue) Add(track ...lavalink.Track)

func (*Queue) Clear

func (q *Queue) Clear()

func (*Queue) Next

func (q *Queue) Next() (lavalink.Track, bool)

func (*Queue) Shuffle

func (q *Queue) Shuffle()

func (*Queue) Skip

func (q *Queue) Skip(amount int) (lavalink.Track, bool)

type QueueManager

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

func (*QueueManager) Delete

func (q *QueueManager) Delete(guildID snowflake.ID)

func (*QueueManager) Get

func (q *QueueManager) Get(guildID snowflake.ID) *Queue

type QueueType

type QueueType string
const (
	QueueTypeNormal      QueueType = "normal"
	QueueTypeRepeatTrack QueueType = "repeat_track"
	QueueTypeRepeatQueue QueueType = "repeat_queue"
)

func (QueueType) String

func (q QueueType) String() string

Jump to

Keyboard shortcuts

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