Fixed the no response thing better

This commit is contained in:
Logan G 2023-03-15 21:38:12 -06:00
parent 6568813ce3
commit cb2495cc12
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -55,7 +55,7 @@ func messageCreate(session *discordgo.Session, message *discordgo.MessageCreate)
result, err := goutubedl.New(context.Background(), url, goutubedl.Options{}) result, err := goutubedl.New(context.Background(), url, goutubedl.Options{})
if err != nil { if err != nil {
// If it's complaining due to a lack of videos, don't care. // If it's complaining due to a lack of videos, don't care.
if noVideo, _ := regexp.MatchString(".*There's no video in this tweet.*", err.Error()); noVideo { if noVideo, _ := regexp.MatchString(".*No video could be found in this tweet*", err.Error()); noVideo {
respond = true respond = true
} else { } else {
log.Println(err) log.Println(err)