Merge pull request #68 from fiveofeight/upstream

Now gives an error message if you have an invalid API key, instead of…
pull/80/head
Matthieu Grieger 2015-05-14 10:41:08 -07:00
commit fce0f0e378
2 changed files with 5 additions and 0 deletions

View File

@ -203,6 +203,8 @@ func add(user *gumble.User, username, url string) {
}
} else if fmt.Sprint(err) == "video exceeds the maximum allowed duration." {
dj.SendPrivateMessage(user, VIDEO_TOO_LONG_MSG)
} else if fmt.Sprint(err) == "Invalid API key supplied." {
dj.SendPrivateMessage(user, INVALID_API_KEY)
} else {
dj.SendPrivateMessage(user, INVALID_YOUTUBE_ID_MSG)
}

View File

@ -7,6 +7,9 @@
package main
// Message shown to users when the bot has an invalid YouTube API key.
const INVALID_API_KEY = "MumbleDJ does not have a valid YouTube API key."
// Message shown to users when they do not have permission to execute a command.
const NO_PERMISSION_MSG = "You do not have permission to execute that command."