Merge pull request #68 from fiveofeight/upstream
Now gives an error message if you have an invalid API key, instead of…
This commit is contained in:
commit
fce0f0e378
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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."
|
||||
|
||||
|
|
Reference in a new issue