bot

package
v0.0.0-...-848f767 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start() error

Types

type Config

type Config struct {
	Prefix             string `default:"8g!"`
	DiscordID          string `required:"true" split_words:"true"`
	DiscordToken       string `required:"true" split_words:"true"`
	LogLevel           string `default:"debug" split_words:"true"`
	LavalinkPassphrase string `default:"correct-horse-battery-staple" split_words:"true"`
	LavalinkHost       string `default:"localhost:2333" split_words:"true"`
}

type GuildState

type GuildState struct {
	Queue         []QueueItem
	TextChannelID string
	NowPlaying    *QueueItem

	TrackQueued chan struct{}
	TrackEnded  chan struct{}
}

type Instance

type Instance struct {
	Session       *discordgo.Session
	Config        Config
	CommandParser *parsley.Parser

	LavalinkConnection waterlink.Connection
	LavalinkRequester  waterlink.Requester

	State map[string]*GuildState
}
var Bot *Instance

type PlayCommandArgs

type PlayCommandArgs struct {
	Query string
}

type QueueItem

type QueueItem struct {
	User  *discordgo.User
	Track track.Track
	Query string
}

type SeekCommandArgs

type SeekCommandArgs struct {
	Target string `description:"Target duration to seek to"`
}

Jump to

Keyboard shortcuts

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