models

package
v0.0.0-...-e22a1a7 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lavalink struct {
	// Client is the Lavalink client.
	Client disgolink.Client
	// Queues is the Lavalink queues.
	Queues *LavalinkQueueManager
}

Lavalink contains the Lavalink client and the queues.

type LavalinkNodes

type LavalinkNodes struct {
	Nodes []disgolink.NodeConfig `json:"nodes"`
}

LavalinkNodes contains the Lavalink nodes.

type LavalinkQueue

type LavalinkQueue struct {
	// Tracks is the tracks in the queue.
	Tracks []lavalink.Track
	// Type is the type of the queue.
	Type LavalinkQueueType
}

LavalinkQueue contains the Lavalink queue.

func (*LavalinkQueue) Add

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

Add adds tracks to the queue.

func (*LavalinkQueue) Clear

func (q *LavalinkQueue) Clear()

Clear clears the queue.

func (*LavalinkQueue) Next

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

Next returns the next track in the queue.

func (*LavalinkQueue) Shuffle

func (q *LavalinkQueue) Shuffle()

Shuffle shuffles the tracks in the queue.

func (*LavalinkQueue) Skip

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

Skip skips the specified amount of tracks in the queue.

type LavalinkQueueManager

type LavalinkQueueManager struct {
	Queues map[snowflake.ID]*LavalinkQueue
}

LavalinkQueueManager contains the Lavalink queues.

func (*LavalinkQueueManager) Delete

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

Delete deletes the Lavalink queue for the specified guild.

func (*LavalinkQueueManager) Get

func (q *LavalinkQueueManager) Get(guildID snowflake.ID) *LavalinkQueue

Get returns the Lavalink queue for the specified guild.

type LavalinkQueueType

type LavalinkQueueType string

LavalinkQueueType is the type of the Lavalink queue.

const (
	// LavalinkQueueTypeNormal is the normal queue type.
	LavalinkQueueTypeNormal LavalinkQueueType = "normal"
	// LavalinkQueueTypeRepeatTrack is the repeat track queue type.
	LavalinkQueueTypeRepeatTrack LavalinkQueueType = "repeat_track"
	// LavalinkQueueTypeRepeatQueue is the repeat queue queue type.
	LavalinkQueueTypeRepeatQueue LavalinkQueueType = "repeat_queue"
)

func (LavalinkQueueType) String

func (q LavalinkQueueType) String() string

String returns the string representation of the LavalinkQueueType.

Jump to

Keyboard shortcuts

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