Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( UrrNotPaused = core.UrrNew("Not paused.") UrrNotPlaying = core.UrrNew("Not playing anything.") UrrNotLooping = core.UrrNew("Not looping.") UrrSiteNotSupported = core.UrrNew("This website is not supported.") )
var Advanced = advanced{}
var AdvancedLoop = advancedLoop{}
var AdvancedLoopOff = advancedLoopOff{}
var AdvancedLoopOn = advancedLoopOn{}
var AdvancedPause = advancedPause{}
var AdvancedPlay = advancedPlay{}
var AdvancedQueue = advancedQueue{}
var AdvancedResume = advancedResume{}
var AdvancedSkip = advancedSkip{}
Functions ¶
func LoopOff ¶
LoopOff will turn looping off by setting the state to Play for the specified place. Returns UrrNotPlaying if the queue is empty. Returns UrrNotLooping if the current state is not Loop.
func LoopOn ¶
LoopOn will turn on looping by setting the state to Loop for the specified place. Returns an UrrNotPlaying if the queue is empty.
func Pause ¶
Pause will pause by setting the state to Pause in the specified place. Returns UrrNotPlaying if the queue is empty or if the state is not set to Play.
Types ¶
type Item ¶
func Play ¶
Play will:
- Check if the first argument is a url, if yes, then will try to stream it. If not then assumes that it is a search and will query youtube to find the corresponding video.
- Join the voice channel if necessary.
- Adds the item in the queue, if no queue exists creates one and begins item playback.
Returns UrrSiteNotSupported if the provided URL is a website that is not supported. Also passes any potential user errors that were generated by youtube.SearchVideo if a video search was performed.