diff --git a/commands.go b/commands.go index 1ecfafb..8e37511 100644 --- a/commands.go +++ b/commands.go @@ -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) } diff --git a/strings.go b/strings.go index 15402dc..d48e7a7 100644 --- a/strings.go +++ b/strings.go @@ -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."