Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHandlers ¶
This adds a handler to the given discord session, which will look for messages sent that start with ~play
Types ¶
type Video ¶
type Video struct {
// contains filtered or unexported fields
}
func GetVideo ¶
This gets a video from a url. This does not fetch any data, you must call Video.Download* functions in order to download anything. This will search for the video if the url does not start with https://.
func (*Video) Info ¶
This gets metadata like the date uploaded, and the title of the video. This function will cache the info, so calling it multiple times will only ever access the network once. Call RefreshInfo to refresh this cache.
func (*Video) RefreshInfo ¶
This gets the video info, and always accesses the network. There is little reason to call this function (Info() will cache the result, and only access the network on the first call)
func (*Video) URL ¶
This returns a url to the video, in the format https://youtu.be/<id>