Cleaning up comments
This commit is contained in:
parent
79472a1791
commit
58bfc9ce23
|
@ -1,4 +1,4 @@
|
|||
MumbleDJ [![Circle CI](https://circleci.com/gh/MichaelOultram/mumbledj/tree/master.svg?style=svg)](https://circleci.com/gh/MichaelOultram/mumbledj/tree/master)
|
||||
MumbleDJ
|
||||
========
|
||||
**A Mumble bot that plays music fetched from YouTube videos and Soundcloud tracks.**
|
||||
|
||||
|
@ -62,6 +62,9 @@ Command | Description | Arguments | Admin | Example
|
|||
**cachesize** | Outputs the total file size of the cache in MB. | None | Yes | `!cachesize`
|
||||
**kill** | Safely cleans the bot environment and disconnects from the server. Please use this command to stop the bot instead of force closing, as the kill command deletes any remaining songs in the `~/.mumbledj/songs` directory. | None | Yes | `!kill`
|
||||
|
||||
|
||||
|
||||
|
||||
## INSTALLATION
|
||||
|
||||
###YOUTUBE API KEYS
|
||||
|
|
|
@ -54,6 +54,8 @@ type Playlist interface {
|
|||
|
||||
var services []Service
|
||||
|
||||
// FindServiceAndAdd tries the given url with each service
|
||||
// and adds the song/playlist with the correct service
|
||||
func FindServiceAndAdd(user *gumble.User, url string) error {
|
||||
var urlService Service
|
||||
|
||||
|
|
|
@ -32,17 +32,9 @@ var youtubeVideoPatterns = []string{
|
|||
`https?:\/\/www.youtube.com\/v\/([\w-]+)(\?t=\d*m?\d*s?)?`,
|
||||
}
|
||||
|
||||
// ------
|
||||
// TYPES
|
||||
// ------
|
||||
|
||||
// YouTube implements the Service interface
|
||||
type YouTube struct{}
|
||||
|
||||
// ---------------
|
||||
// YOUTUBE SERVICE
|
||||
// ---------------
|
||||
|
||||
// URLRegex checks to see if service will accept URL
|
||||
func (yt YouTube) URLRegex(url string) bool {
|
||||
return RegexpFromURL(url, append(youtubeVideoPatterns, []string{youtubePlaylistPattern}...)) != nil
|
||||
|
|
Reference in a new issue