Documentation ¶
Index ¶
- Constants
- Variables
- func AddToQueue(ctx *exrouter.Context)
- func AddToQueueYT(ctx *exrouter.Context)
- func CreateVoiceConnection(ctx *exrouter.Context, guild *discordgo.Guild, conn *Connection) (*discordgo.VoiceConnection, error)
- func Play(ctx *exrouter.Context, conn *Connection, vc *discordgo.VoiceConnection)
- type Connection
- type Connections
- type PlaylistResponse
- type QUERYTYPE
- type SongResponse
- type Youtube
- func (youtube Youtube) GetPlaylist(input string) (*[]PlaylistResponse, error)
- func (youtube Youtube) GetSong(input string) (*SongResponse, error)
- func (youtube Youtube) YoutubeDLLink(input string) (QUERYTYPE, *string, error)
- func (youtube Youtube) YoutubeDLQuery(input string) (QUERYTYPE, *string, error)
Constants ¶
View Source
const COOLDOWNTIME = 10
Variables ¶
View Source
var ( ServerConnections = Connections{ConnectionMap: make(map[string]*Connection)} UserJoinError = errors.New("you are not in a voice channel") Client = http.Client{Timeout: time.Second * 10} )
MusicConnections maps a Guild ID to an associated voice connection.
Functions ¶
func AddToQueue ¶
func AddToQueueYT ¶
func CreateVoiceConnection ¶
func CreateVoiceConnection(ctx *exrouter.Context, guild *discordgo.Guild, conn *Connection) (*discordgo.VoiceConnection, error)
func Play ¶
func Play(ctx *exrouter.Context, conn *Connection, vc *discordgo.VoiceConnection)
Types ¶
type Connection ¶
type Connection struct { *sync.RWMutex VoiceChannelID string MsgChannelID string Playing bool Done chan error Queue *list.List VoiceConnection *discordgo.VoiceConnection StreamingSession *dca.StreamingSession LastInvoke time.Time }
func (*Connection) AddYouTubeVideo ¶
func (c *Connection) AddYouTubeVideo(song *SongResponse)
AddYouTubeVideo will add the download URL for a YouTube video to the queue.
func (*Connection) YoutubeCleanup ¶
func (c *Connection) YoutubeCleanup()
type Connections ¶
type Connections struct { *sync.RWMutex ConnectionMap map[string]*Connection }
type PlaylistResponse ¶
type SongResponse ¶
type Youtube ¶
type Youtube struct{}
Empty youtube receiver
func (Youtube) GetPlaylist ¶
func (youtube Youtube) GetPlaylist(input string) (*[]PlaylistResponse, error)
func (Youtube) YoutubeDLLink ¶
Click to show internal directories.
Click to hide internal directories.